2014-11-24 09:08:18 +00:00
; REQUIRES: object-emission
; RUN: %llc_dwarf -O0 -filetype=obj %s -o - | llvm-dwarfdump -debug-dump=info - | FileCheck %s
; Ensure that pointer constants are emitted as unsigned data. Alternatively,
; these could be signless data (dataN).
; Built with Clang from:
; template <void *V, void (*F)(), int i>
; void func() {}
; template void func<nullptr, nullptr, 42>();
; CHECK: DW_TAG_subprogram
; CHECK: DW_TAG_template_value_parameter
; CHECK: DW_AT_name {{.*}} "V"
; CHECK: DW_AT_const_value [DW_FORM_udata] (0)
; CHECK: DW_TAG_template_value_parameter
; CHECK: DW_AT_name {{.*}} "F"
; CHECK: DW_AT_const_value [DW_FORM_udata] (0)
; Function Attrs: nounwind uwtable
define weak_odr void @_Z4funcILPv0ELPFvvE0ELi42EEvv ( ) #0 {
entry:
ret void , !dbg !18
}
attributes #0 = { nounwind uwtable "less-precise-fpmad" = "false" "no-frame-pointer-elim" = "true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math" = "false" "no-nans-fp-math" = "false" "stack-protector-buffer-size" = "8" "unsafe-fp-math" = "false" "use-soft-float" = "false" }
!llvm.dbg.cu = ! { !0 }
!llvm.module.flags = ! { !15 , !16 }
!llvm.ident = ! { !17 }
2015-05-27 18:44:32 +00:00
!0 = !DICompileUnit ( language: D W _ L A N G _ C _ p l u s _ p l u s , producer: "clang version 3.5.0 " , isOptimized: false , emissionKind: 1 , file: !1 , enums: !2 , retainedTypes: !2 , subprograms: !3 , globals: !2 , imports: !2 )
!1 = !DIFile ( filename: "constant-pointers.cpp" , directory: "/tmp/dbginfo" )
2015-01-18 16:17:27 +00:00
!2 = ! { }
!3 = ! { !4 }
2015-05-27 18:44:32 +00:00
!4 = !DISubprogram ( name: "func<nullptr, nullptr, 42>" , linkageName: "_Z4funcILPv0ELPFvvE0ELi42EEvv" , line: 2 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: false , scopeLine: 2 , file: !1 , scope: !5 , type: !6 , function: void ( ) * @_Z4funcILPv0ELPFvvE0ELi42EEvv , templateParams: !8 , variables: !2 )
!5 = !DIFile ( filename: "constant-pointers.cpp" , directory: "/tmp/dbginfo" )
!6 = !DISubroutineType ( types: !7 )
2015-01-18 16:17:27 +00:00
!7 = ! { null }
!8 = ! { !9 , !11 , !13 }
2015-05-27 18:44:32 +00:00
!9 = !DITemplateValueParameter ( tag: D W _ T A G _ t e m p l a t e _ v a l u e _ p a r a m e t e r , name: "V" , type: !10 , value: i8 0 )
!10 = !DIDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , size: 64 , align: 64 , baseType: null )
!11 = !DITemplateValueParameter ( tag: D W _ T A G _ t e m p l a t e _ v a l u e _ p a r a m e t e r , name: "F" , type: !12 , value: i8 0 )
!12 = !DIDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , size: 64 , align: 64 , baseType: !6 )
!13 = !DITemplateValueParameter ( tag: D W _ T A G _ t e m p l a t e _ v a l u e _ p a r a m e t e r , name: "i" , type: !14 , value: i32 42 )
!14 = !DIBasicType ( tag: D W _ T A G _ b a s e _ type , name: "int" , size: 32 , align: 32 , encoding: D W _ A T E _ s i g n e d )
2015-01-18 16:17:27 +00:00
!15 = ! { i32 2 , !"Dwarf Version" , i32 4 }
2015-05-27 18:44:32 +00:00
!16 = ! { i32 2 , !"Debug Info Version" , i32 3 }
2015-01-18 16:17:27 +00:00
!17 = ! { !"clang version 3.5.0 " }
2015-05-27 18:44:32 +00:00
!18 = !DILocation ( line: 3 , scope: !4 )