2014-12-24 01:17:51 +00:00
; struct A {
; void foo();
; };
;
; void (A::*p)() = &A::foo;
;
; RUN: llc -filetype=obj -o - %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s
; Check that the member function pointer is emitted without a DW_AT_size attribute.
; CHECK: DW_TAG_ptr_to_member_type
; CHECK-NOT: DW_AT_{{.*}}size
; CHECK: DW_TAG
;
; ModuleID = 'memberfnptr.cpp'
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx"
%struct.A = type { i8 }
@p = global { i64 , i64 } { i64 ptrtoint ( void ( %struct.A * ) * @_ZN1A3fooEv to i64 ) , i64 0 } , align 8
declare void @_ZN1A3fooEv ( %struct.A * )
!llvm.dbg.cu = ! { !0 }
!llvm.module.flags = ! { !14 , !15 , !16 }
!llvm.ident = ! { !17 }
2015-03-03 17:24:31 +00:00
!0 = !MDCompileUnit ( language: D W _ L A N G _ C _ p l u s _ p l u s , producer: "clang version 3.6.0 " , isOptimized: false , emissionKind: 1 , file: !1 , enums: !2 , retainedTypes: !3 , subprograms: !2 , globals: !10 , imports: !2 )
!1 = !MDFile ( filename: "memberfnptr.cpp" , directory: "" )
2014-12-24 01:17:51 +00:00
!2 = ! { }
!3 = ! { !4 }
2015-03-03 17:24:31 +00:00
!4 = !MDCompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "A" , line: 1 , size: 8 , align: 8 , file: !1 , elements: !5 , identifier: "_ZTS1A" )
2014-12-24 01:17:51 +00:00
!5 = ! { !6 }
2015-03-03 17:24:31 +00:00
!6 = !MDSubprogram ( name: "foo" , linkageName: "_ZN1A3fooEv" , line: 2 , isLocal: false , isDefinition: false , flags: D I F l a g P r o t o t y p e d , isOptimized: false , scopeLine: 2 , file: !1 , scope: !"_ZTS1A" , type: !7 )
!7 = !MDSubroutineType ( types: !8 )
2014-12-24 01:17:51 +00:00
!8 = ! { null , !9 }
2015-03-03 17:24:31 +00:00
!9 = !MDDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , size: 64 , align: 64 , flags: D I F l a g A r t i f i c i a l | D I F l a g O b j e c t P o i n t e r , baseType: !"_ZTS1A" )
2014-12-24 01:17:51 +00:00
!10 = ! { !11 }
2015-03-03 17:24:31 +00:00
!11 = !MDGlobalVariable ( name: "p" , line: 5 , isLocal: false , isDefinition: true , scope: null , file: !12 , type: !13 , variable: { i64 , i64 } * @p )
!12 = !MDFile ( filename: "memberfnptr.cpp" , directory: "" )
!13 = !MDDerivedType ( tag: D W _ T A G _ p t r _ t o _ m e m b e r _ type , size: 64 , baseType: !7 , extraData: !"_ZTS1A" )
2014-12-24 01:17:51 +00:00
!14 = ! { i32 2 , !"Dwarf Version" , i32 2 }
2015-03-03 17:24:31 +00:00
!15 = ! { i32 2 , !"Debug Info Version" , i32 3 }
2014-12-24 01:17:51 +00:00
!16 = ! { i32 1 , !"PIC Level" , i32 2 }
!17 = ! { !"clang version 3.6.0 " }