2013-04-11 03:53:26 +08:00
; REQUIRES: object-emission
2013-04-27 09:07:22 +08:00
; XFAIL: hexagon
2013-04-11 03:53:26 +08:00
2014-01-30 09:39:17 +08:00
; RUN: %llc_dwarf -filetype=obj -O0 < %s > %t
2013-01-26 05:44:53 +08:00
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
2013-01-07 13:51:15 +08:00
; CHECK: DW_TAG_ptr_to_member_type
2013-10-30 06:49:29 +08:00
; CHECK: DW_TAG_ptr_to_member_type
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE:0x[0-9a-f]+]]})
; CHECK: [[TYPE]]: DW_TAG_subroutine_type
2013-01-30 03:35:24 +08:00
; CHECK: DW_TAG_formal_parameter
; CHECK-NEXT: DW_AT_type
2013-04-27 09:07:52 +08:00
; CHECK-NEXT: DW_AT_artificial [DW_FORM_flag
2013-01-07 13:51:15 +08:00
; IR generated from clang -g with the following source:
; struct S {
; };
;
; int S::*x = 0;
; void (S::*y)(int) = 0;
2016-12-22 08:45:21 +08:00
source_filename = "test/DebugInfo/Generic/member-pointers.ll"
2013-01-07 13:51:15 +08:00
2016-12-22 08:45:21 +08:00
@x = global i64 -1 , align 8 , !dbg !0
@y = global { i64 , i64 } zeroinitializer , align 8 , !dbg !7
!llvm.dbg.cu = ! { !13 }
!llvm.module.flags = ! { !15 }
!0 = !DIGlobalVariableExpression ( var: !1 )
!1 = !DIGlobalVariable ( name: "x" , scope: null , file: !2 , line: 4 , type: !3 , isLocal: false , isDefinition: true )
!2 = !DIFile ( filename: "simple.cpp" , directory: "/home/blaikie/Development/scratch" )
!3 = !DIDerivedType ( tag: D W _ T A G _ p t r _ t o _ m e m b e r _ type , baseType: !4 , extraData: !5 )
!4 = !DIBasicType ( name: "int" , size: 32 , align: 32 , encoding: D W _ A T E _ s i g n e d )
!5 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "S" , file: !2 , line: 1 , size: 8 , align: 8 , elements: !6 )
!6 = ! { }
!7 = !DIGlobalVariableExpression ( var: !8 )
!8 = !DIGlobalVariable ( name: "y" , scope: null , file: !2 , line: 5 , type: !9 , isLocal: false , isDefinition: true )
!9 = !DIDerivedType ( tag: D W _ T A G _ p t r _ t o _ m e m b e r _ type , baseType: !10 , extraData: !5 )
!10 = !DISubroutineType ( types: !11 )
!11 = ! { null , !12 , !4 }
!12 = !DIDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , baseType: !5 , 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 )
!13 = distinct !DICompileUnit ( language: D W _ L A N G _ C _ p l u s _ p l u s , file: !2 , producer: "clang version 3.3 " , isOptimized: false , runtimeVersion: 0 , emissionKind: F u l l D e b u g , enums: !6 , retainedTypes: !6 , globals: !14 , imports: !6 )
!14 = ! { !0 , !7 }
!15 = ! { i32 1 , !"Debug Info Version" , i32 3 }
2013-01-07 13:51:15 +08:00