2014-05-25 23:38:52 +08:00
; RUN: llc -mtriple=x86_64-linux < %s -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s
2011-11-12 09:57:54 +08:00
; test that we add DW_AT_inline even when we only have concrete out of line
; instances.
; first check that we have a TAG_subprogram at a given offset and it has
; AT_inline.
2014-03-07 09:19:31 +08:00
; CHECK: DW_TAG_class_type
; CHECK: DW_TAG_subprogram
2014-10-06 11:36:31 +08:00
; CHECK: DW_TAG_subprogram
2015-03-11 06:44:45 +08:00
; CHECK: DW_AT_linkage_name {{.*}} "_ZN12nsAutoRefCntaSEi"
2014-05-20 05:54:31 +08:00
2014-05-22 02:04:33 +08:00
; CHECK: DW_TAG_class_type
2014-10-06 11:36:31 +08:00
; CHECK: DW_TAG_subprogram
2015-03-11 06:44:45 +08:00
; CHECK: DW_AT_linkage_name {{.*}} "_ZN17nsAutoRefCnt7ReleaseEv"
2014-10-06 11:36:31 +08:00
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_name {{.*}} "~nsAutoRefCnt"
2014-05-22 02:04:33 +08:00
2014-10-06 11:36:31 +08:00
; CHECK: DW_TAG_subprogram
2014-05-28 02:37:48 +08:00
; CHECK-NEXT: DW_AT_{{.*}}linkage_name {{.*}}D2
2014-10-06 11:36:31 +08:00
; CHECK-NEXT: DW_AT_specification {{.*}} "~nsAutoRefCnt"
2014-05-28 02:37:55 +08:00
; CHECK-NEXT: DW_AT_inline
2014-05-28 02:37:48 +08:00
; CHECK-NOT: DW_AT
; CHECK: DW_TAG
2014-10-06 11:36:31 +08:00
; CHECK: DW_TAG_subprogram
2014-05-28 02:37:48 +08:00
; CHECK-NEXT: DW_AT_{{.*}}linkage_name {{.*}}D1
2014-10-06 11:36:31 +08:00
; CHECK-NEXT: DW_AT_specification {{.*}} "~nsAutoRefCnt"
2014-05-28 02:37:55 +08:00
; CHECK-NEXT: DW_AT_inline
2014-05-28 02:37:48 +08:00
; CHECK-NOT: DW_AT
; CHECK: [[D1_THIS_ABS:.*]]: DW_TAG_formal_parameter
2014-10-06 11:36:31 +08:00
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_specification {{.*}} "_ZN17nsAutoRefCnt7ReleaseEv"
2014-05-20 05:54:31 +08:00
; CHECK: DW_TAG_formal_parameter
; CHECK-NOT: NULL
; CHECK-NOT: DW_TAG
; CHECK: DW_TAG_inlined_subroutine
2014-10-06 11:36:31 +08:00
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "_ZN12nsAutoRefCntaSEi"
2014-05-20 05:54:31 +08:00
; CHECK-NOT: NULL
; CHECK-NOT: DW_TAG
; CHECK: DW_TAG_inlined_subroutine
2014-10-06 11:36:31 +08:00
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "_ZN17nsAutoRefCntD1Ev"
2014-05-20 05:54:31 +08:00
; CHECK-NOT: NULL
; CHECK-NOT: DW_TAG
; CHECK: DW_TAG_inlined_subroutine
2014-10-06 11:36:31 +08:00
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "_ZN17nsAutoRefCntD2Ev"
2011-11-12 09:57:54 +08:00
; and then that a TAG_subprogram refers to it with AT_abstract_origin.
2014-03-07 09:19:31 +08:00
; CHECK: DW_TAG_subprogram
2014-05-28 02:37:55 +08:00
; CHECK-NOT: DW_TAG
2014-10-06 11:36:31 +08:00
; CHECK: DW_AT_abstract_origin {{.*}} "_ZN17nsAutoRefCntD1Ev"
2014-05-20 05:54:31 +08:00
; CHECK: DW_TAG_formal_parameter
2014-05-28 02:37:55 +08:00
; CHECK-NOT: DW_TAG
2014-10-10 23:51:02 +08:00
; CHECK: DW_AT_abstract_origin {{.*}} {[[D1_THIS_ABS]]} "this"
2014-05-20 05:54:31 +08:00
; CHECK: DW_TAG_inlined_subroutine
2014-10-06 11:36:31 +08:00
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "_ZN17nsAutoRefCntD2Ev"
2014-05-20 05:54:31 +08:00
2011-11-12 09:57:54 +08:00
define i32 @_ZN17nsAutoRefCnt7ReleaseEv ( ) {
entry:
store i32 1 , i32 * null , align 4 , !dbg !50
tail call void @_Z8moz_freePv ( i8 * null ) nounwind , !dbg !54
ret i32 0
}
define void @_ZN17nsAutoRefCntD1Ev ( ) {
entry:
tail call void @_Z8moz_freePv ( i8 * null ) nounwind , !dbg !57
ret void
}
declare void @_Z8moz_freePv ( i8 * )
!llvm.dbg.cu = ! { !0 }
2013-11-23 05:49:45 +08:00
!llvm.module.flags = ! { !60 }
2011-11-12 09:57:54 +08:00
2015-04-30 00:38:44 +08:00
!0 = !DICompileUnit ( language: D W _ L A N G _ C _ p l u s _ p l u s , producer: "clang version 3.1 ()" , isOptimized: true , emissionKind: 0 , file: !59 , enums: !1 , retainedTypes: !1 , subprograms: !3 , globals: !47 , imports: !1 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
llvm-svn: 224257
2014-12-16 03:07:53 +08:00
!1 = ! { }
!3 = ! { !5 , !23 , !27 , !31 }
2015-04-30 00:38:44 +08:00
!5 = !DISubprogram ( name: "Release" , linkageName: "_ZN17nsAutoRefCnt7ReleaseEv" , line: 14 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 14 , file: !6 , scope: null , type: !7 , function: i32 ( ) * @_ZN17nsAutoRefCnt7ReleaseEv , declaration: !12 , variables: !20 )
!6 = !DIFile ( filename: "nsAutoRefCnt.ii" , directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/netwerk/base/src" )
!7 = !DISubroutineType ( types: !8 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
llvm-svn: 224257
2014-12-16 03:07:53 +08:00
!8 = ! { !9 , !10 }
2015-04-30 00:38:44 +08:00
!9 = !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 )
!10 = !DIDerivedType ( 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 , baseType: !11 )
!11 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "nsAutoRefCnt" , line: 10 , flags: D I F l a g F w d D e c l , file: !59 )
!12 = !DISubprogram ( name: "Release" , linkageName: "_ZN17nsAutoRefCnt7ReleaseEv" , line: 11 , isLocal: false , isDefinition: false , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 11 , file: !6 , scope: !13 , type: !7 , variables: !18 )
!13 = !DICompositeType ( tag: D W _ T A G _ c l a s s _ type , name: "nsAutoRefCnt" , line: 10 , size: 8 , align: 8 , file: !59 , elements: !14 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
llvm-svn: 224257
2014-12-16 03:07:53 +08:00
!14 = ! { !12 , !15 }
2015-04-30 00:38:44 +08:00
!15 = !DISubprogram ( name: "~nsAutoRefCnt" , line: 12 , isLocal: false , isDefinition: false , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 12 , file: !6 , scope: !13 , type: !16 , variables: !18 )
!16 = !DISubroutineType ( types: !17 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
llvm-svn: 224257
2014-12-16 03:07:53 +08:00
!17 = ! { null , !10 }
!18 = ! { }
!20 = ! { !22 }
2015-04-30 00:38:44 +08:00
!22 = !DILocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "this" , line: 14 , arg: 1 , flags: D I F l a g A r t i f i c i a l , scope: !5 , file: !6 , type: !10 )
!23 = !DISubprogram ( name: "~nsAutoRefCnt" , linkageName: "_ZN17nsAutoRefCntD1Ev" , line: 18 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 18 , file: !6 , scope: null , type: !16 , function: void ( ) * @_ZN17nsAutoRefCntD1Ev , declaration: !15 , variables: !24 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
llvm-svn: 224257
2014-12-16 03:07:53 +08:00
!24 = ! { !26 }
2015-04-30 00:38:44 +08:00
!26 = !DILocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "this" , line: 18 , arg: 1 , flags: D I F l a g A r t i f i c i a l , scope: !23 , file: !6 , type: !10 )
!27 = !DISubprogram ( name: "~nsAutoRefCnt" , linkageName: "_ZN17nsAutoRefCntD2Ev" , line: 18 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 18 , file: !6 , scope: null , type: !16 , function: i32 ( ) * null , declaration: !15 , variables: !28 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
llvm-svn: 224257
2014-12-16 03:07:53 +08:00
!28 = ! { !30 }
2015-04-30 00:38:44 +08:00
!30 = !DILocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "this" , line: 18 , arg: 1 , flags: D I F l a g A r t i f i c i a l , scope: !27 , file: !6 , type: !10 )
!31 = !DISubprogram ( name: "operator=" , linkageName: "_ZN12nsAutoRefCntaSEi" , line: 4 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 4 , file: !6 , scope: null , type: !32 , declaration: !36 , variables: !43 )
!32 = !DISubroutineType ( types: !33 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
llvm-svn: 224257
2014-12-16 03:07:53 +08:00
!33 = ! { !9 , !34 , !9 }
2015-04-30 00:38:44 +08:00
!34 = !DIDerivedType ( 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 , baseType: !35 )
!35 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "nsAutoRefCnt" , line: 2 , flags: D I F l a g F w d D e c l , file: !59 )
!36 = !DISubprogram ( name: "operator=" , linkageName: "_ZN12nsAutoRefCntaSEi" , line: 4 , isLocal: false , isDefinition: false , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 4 , file: !6 , scope: !37 , type: !32 , variables: !18 )
!37 = !DICompositeType ( tag: D W _ T A G _ c l a s s _ type , name: "nsAutoRefCnt" , line: 2 , size: 32 , align: 32 , file: !59 , elements: !38 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
llvm-svn: 224257
2014-12-16 03:07:53 +08:00
!38 = ! { !39 , !40 , !36 }
2015-04-30 00:38:44 +08:00
!39 = !DIDerivedType ( tag: D W _ T A G _ m e m b e r , name: "mValue" , line: 7 , size: 32 , align: 32 , file: !59 , scope: !37 , baseType: !9 )
!40 = !DISubprogram ( name: "nsAutoRefCnt" , line: 3 , isLocal: false , isDefinition: false , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 3 , file: !6 , scope: !37 , type: !41 , variables: !18 )
!41 = !DISubroutineType ( types: !42 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
llvm-svn: 224257
2014-12-16 03:07:53 +08:00
!42 = ! { null , !34 }
!43 = ! { !45 , !46 }
2015-04-30 00:38:44 +08:00
!45 = !DILocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "this" , line: 4 , arg: 1 , flags: D I F l a g A r t i f i c i a l , scope: !31 , file: !6 , type: !34 )
!46 = !DILocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "aValue" , line: 4 , arg: 2 , scope: !31 , file: !6 , type: !9 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
llvm-svn: 224257
2014-12-16 03:07:53 +08:00
!47 = ! { !49 }
2015-04-30 00:38:44 +08:00
!49 = !DIGlobalVariable ( name: "mRefCnt" , line: 9 , isLocal: false , isDefinition: true , scope: null , file: !6 , type: !37 , variable: i32 * null )
!50 = !DILocation ( line: 5 , column: 5 , scope: !51 , inlinedAt: !52 )
!51 = distinct !DILexicalBlock ( line: 4 , column: 29 , file: !6 , scope: !31 )
!52 = !DILocation ( line: 15 , scope: !53 )
!53 = distinct !DILexicalBlock ( line: 14 , column: 34 , file: !6 , scope: !5 )
!54 = !DILocation ( line: 19 , column: 3 , scope: !55 , inlinedAt: !56 )
!55 = distinct !DILexicalBlock ( line: 18 , column: 41 , file: !6 , scope: !27 )
!56 = !DILocation ( line: 18 , column: 41 , scope: !23 , inlinedAt: !52 )
!57 = !DILocation ( line: 19 , column: 3 , scope: !55 , inlinedAt: !58 )
!58 = !DILocation ( line: 18 , column: 41 , scope: !23 )
!59 = !DIFile ( filename: "nsAutoRefCnt.ii" , directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/netwerk/base/src" )
2015-03-04 01:24:31 +08:00
!60 = ! { i32 1 , !"Debug Info Version" , i32 3 }