2014-05-20 02:19:15 +00:00
|
|
|
; REQUIRES: object-emission
|
|
|
|
|
|
|
|
; RUN: %llc_dwarf -O0 -filetype=obj -o - < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s
|
2010-04-06 23:53:48 +00:00
|
|
|
; Radar 7833483
|
2014-05-20 02:19:15 +00:00
|
|
|
; Do not emit a separate out-of-line definition DIE for the function-local 'foo'
|
|
|
|
; function (member of the function local 'A' type)
|
2014-05-20 02:40:34 +00:00
|
|
|
; CHECK: DW_TAG_class_type
|
|
|
|
; CHECK: DW_TAG_class_type
|
2014-05-20 02:19:15 +00:00
|
|
|
; CHECK-NEXT: DW_AT_name {{.*}} "A"
|
|
|
|
; Check that the subprogram inside the class definition has low_pc, only
|
|
|
|
; attached to the definition.
|
|
|
|
; CHECK: [[FOO_INL:0x........]]: DW_TAG_subprogram
|
|
|
|
; CHECK-NOT: DW_TAG
|
|
|
|
; CHECK: DW_AT_low_pc
|
DebugInfo: Lazily attach definition attributes to definitions.
This is a precursor to fixing inlined debug info where the concrete,
out-of-line definition may preceed any inlined usage. To cope with this,
the attributes that may appear on the concrete definition or the
abstract definition are delayed until the end of the module. Then, if an
abstract definition was created, it is referenced (and no other
attributes are added to the out-of-line definition), otherwise the
attributes are added directly to the out-of-line definition.
In a couple of cases this causes not just reordering of attributes, but
reordering of types. When the creation of the attribute is delayed, if
that creation would create a type (such as for a DW_AT_type attribute)
then other top level DIEs may've been constructed during the delay,
causing the referenced type to be created and added after those
intervening DIEs. In the extreme case, in cross-cu-inlining.ll, this
actually causes the DW_TAG_basic_type for "int" to move from one CU to
another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209674 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-27 18:37:43 +00:00
|
|
|
; CHECK-NOT: DW_TAG
|
2015-03-10 22:44:45 +00:00
|
|
|
; CHECK: DW_AT_linkage_name {{.*}} "_ZZN1B2fnEvEN1A3fooEv"
|
2014-05-20 02:19:15 +00:00
|
|
|
; And just double check that there's no out of line definition that references
|
|
|
|
; this subprogram.
|
|
|
|
; CHECK-NOT: DW_AT_specification {{.*}} {[[FOO_INL]]}
|
2010-04-06 23:53:48 +00:00
|
|
|
|
|
|
|
%class.A = type { i8 }
|
|
|
|
%class.B = type { i8 }
|
|
|
|
|
|
|
|
define i32 @main() ssp {
|
|
|
|
entry:
|
|
|
|
%retval = alloca i32, align 4 ; <i32*> [#uses=3]
|
|
|
|
%b = alloca %class.A, align 1 ; <%class.A*> [#uses=1]
|
|
|
|
store i32 0, i32* %retval
|
2015-03-03 17:24:31 +00:00
|
|
|
call void @llvm.dbg.declare(metadata %class.A* %b, metadata !0, metadata !MDExpression()), !dbg !14
|
2010-04-06 23:53:48 +00:00
|
|
|
%call = call i32 @_ZN1B2fnEv(%class.A* %b), !dbg !15 ; <i32> [#uses=1]
|
|
|
|
store i32 %call, i32* %retval, !dbg !15
|
2015-02-27 21:17:42 +00:00
|
|
|
%0 = load i32, i32* %retval, !dbg !16 ; <i32> [#uses=1]
|
2010-04-06 23:53:48 +00:00
|
|
|
ret i32 %0, !dbg !16
|
|
|
|
}
|
|
|
|
|
Move the complex address expression out of DIVariable and into an extra
argument of the llvm.dbg.declare/llvm.dbg.value intrinsics.
Previously, DIVariable was a variable-length field that has an optional
reference to a Metadata array consisting of a variable number of
complex address expressions. In the case of OpPiece expressions this is
wasting a lot of storage in IR, because when an aggregate type is, e.g.,
SROA'd into all of its n individual members, the IR will contain n copies
of the DIVariable, all alike, only differing in the complex address
reference at the end.
By making the complex address into an extra argument of the
dbg.value/dbg.declare intrinsics, all of the pieces can reference the
same variable and the complex address expressions can be uniqued across
the CU, too.
Down the road, this will allow us to move other flags, such as
"indirection" out of the DIVariable, too.
The new intrinsics look like this:
declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr)
declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr)
This patch adds a new LLVM-local tag to DIExpressions, so we can detect
and pretty-print DIExpression metadata nodes.
What this patch doesn't do:
This patch does not touch the "Indirect" field in DIVariable; but moving
that into the expression would be a natural next step.
http://reviews.llvm.org/D4919
rdar://problem/17994491
Thanks to dblaikie and dexonsmith for reviewing this patch!
Note: I accidentally committed a bogus older version of this patch previously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218787 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-01 18:55:02 +00:00
|
|
|
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
|
2010-04-06 23:53:48 +00:00
|
|
|
|
|
|
|
define linkonce_odr i32 @_ZN1B2fnEv(%class.A* %this) ssp align 2 {
|
|
|
|
entry:
|
|
|
|
%retval = alloca i32, align 4 ; <i32*> [#uses=2]
|
|
|
|
%this.addr = alloca %class.A*, align 8 ; <%class.A**> [#uses=2]
|
|
|
|
%a = alloca %class.A, align 1 ; <%class.A*> [#uses=1]
|
|
|
|
%i = alloca i32, align 4 ; <i32*> [#uses=2]
|
|
|
|
store %class.A* %this, %class.A** %this.addr
|
2015-03-03 17:24:31 +00:00
|
|
|
call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !17, metadata !MDExpression()), !dbg !18
|
2015-02-27 21:17:42 +00:00
|
|
|
%this1 = load %class.A*, %class.A** %this.addr ; <%class.A*> [#uses=0]
|
2015-03-03 17:24:31 +00:00
|
|
|
call void @llvm.dbg.declare(metadata %class.A* %a, metadata !19, metadata !MDExpression()), !dbg !27
|
|
|
|
call void @llvm.dbg.declare(metadata i32* %i, metadata !28, metadata !MDExpression()), !dbg !29
|
2010-04-06 23:53:48 +00:00
|
|
|
%call = call i32 @_ZZN1B2fnEvEN1A3fooEv(%class.A* %a), !dbg !30 ; <i32> [#uses=1]
|
|
|
|
store i32 %call, i32* %i, !dbg !30
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp = load i32, i32* %i, !dbg !31 ; <i32> [#uses=1]
|
2010-04-06 23:53:48 +00:00
|
|
|
store i32 %tmp, i32* %retval, !dbg !31
|
2015-02-27 21:17:42 +00:00
|
|
|
%0 = load i32, i32* %retval, !dbg !32 ; <i32> [#uses=1]
|
2010-04-06 23:53:48 +00:00
|
|
|
ret i32 %0, !dbg !32
|
|
|
|
}
|
|
|
|
|
|
|
|
define internal i32 @_ZZN1B2fnEvEN1A3fooEv(%class.A* %this) ssp align 2 {
|
|
|
|
entry:
|
|
|
|
%retval = alloca i32, align 4 ; <i32*> [#uses=2]
|
|
|
|
%this.addr = alloca %class.A*, align 8 ; <%class.A**> [#uses=2]
|
|
|
|
store %class.A* %this, %class.A** %this.addr
|
2015-03-03 17:24:31 +00:00
|
|
|
call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !33, metadata !MDExpression()), !dbg !34
|
2015-02-27 21:17:42 +00:00
|
|
|
%this1 = load %class.A*, %class.A** %this.addr ; <%class.A*> [#uses=0]
|
2010-04-06 23:53:48 +00:00
|
|
|
store i32 42, i32* %retval, !dbg !35
|
2015-02-27 21:17:42 +00:00
|
|
|
%0 = load i32, i32* %retval, !dbg !35 ; <i32> [#uses=1]
|
2010-04-06 23:53:48 +00:00
|
|
|
ret i32 %0, !dbg !35
|
|
|
|
}
|
|
|
|
|
2013-03-08 00:23:31 +00:00
|
|
|
!llvm.dbg.cu = !{!4}
|
2013-11-22 21:49:45 +00:00
|
|
|
!llvm.module.flags = !{!40}
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
|
|
|
!37 = !{!2, !10, !23}
|
2013-03-08 00:23:31 +00:00
|
|
|
|
2015-03-03 17:24:31 +00:00
|
|
|
!0 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 16, scope: !1, file: !3, type: !8)
|
|
|
|
!1 = distinct !MDLexicalBlock(line: 15, column: 12, file: !38, scope: !2)
|
|
|
|
!2 = !MDSubprogram(name: "main", linkageName: "main", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 15, file: !38, scope: !3, type: !5, function: i32 ()* @main)
|
|
|
|
!3 = !MDFile(filename: "one.cc", directory: "/tmp")
|
|
|
|
!4 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang 1.5", isOptimized: false, emissionKind: 0, file: !38, enums: !39, retainedTypes: !39, subprograms: !37, imports: null)
|
|
|
|
!5 = !MDSubroutineType(types: !6)
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
|
|
|
!6 = !{!7}
|
2015-03-03 17:24:31 +00:00
|
|
|
!7 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
|
|
|
!8 = !MDCompositeType(tag: DW_TAG_class_type, name: "B", line: 2, size: 8, align: 8, file: !38, scope: !3, elements: !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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
|
|
|
!9 = !{!10}
|
2015-03-03 17:24:31 +00:00
|
|
|
!10 = !MDSubprogram(name: "fn", linkageName: "_ZN1B2fnEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !38, scope: !8, type: !11, function: i32 (%class.A*)* @_ZN1B2fnEv)
|
|
|
|
!11 = !MDSubroutineType(types: !12)
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
|
|
|
!12 = !{!7, !13}
|
2015-03-03 17:24:31 +00:00
|
|
|
!13 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !38, scope: !3, baseType: !8)
|
2015-01-14 22:27:36 +00:00
|
|
|
!14 = !MDLocation(line: 16, column: 5, scope: !1)
|
|
|
|
!15 = !MDLocation(line: 17, column: 3, scope: !1)
|
|
|
|
!16 = !MDLocation(line: 18, column: 1, scope: !2)
|
2015-03-03 17:24:31 +00:00
|
|
|
!17 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 4, arg: 0, scope: !10, file: !3, type: !13)
|
2015-01-14 22:27:36 +00:00
|
|
|
!18 = !MDLocation(line: 4, column: 7, scope: !10)
|
2015-03-03 17:24:31 +00:00
|
|
|
!19 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "a", line: 9, scope: !20, file: !3, type: !21)
|
|
|
|
!20 = distinct !MDLexicalBlock(line: 4, column: 12, file: !38, scope: !10)
|
|
|
|
!21 = !MDCompositeType(tag: DW_TAG_class_type, name: "A", line: 5, size: 8, align: 8, file: !38, scope: !10, elements: !22)
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
|
|
|
!22 = !{!23}
|
2015-03-03 17:24:31 +00:00
|
|
|
!23 = !MDSubprogram(name: "foo", linkageName: "_ZZN1B2fnEvEN1A3fooEv", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 7, file: !38, scope: !21, type: !24, function: i32 (%class.A*)* @_ZZN1B2fnEvEN1A3fooEv)
|
|
|
|
!24 = !MDSubroutineType(types: !25)
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
|
|
|
!25 = !{!7, !26}
|
2015-03-03 17:24:31 +00:00
|
|
|
!26 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !38, scope: !3, baseType: !21)
|
2015-01-14 22:27:36 +00:00
|
|
|
!27 = !MDLocation(line: 9, column: 7, scope: !20)
|
2015-03-03 17:24:31 +00:00
|
|
|
!28 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i", line: 10, scope: !20, file: !3, type: !7)
|
2015-01-14 22:27:36 +00:00
|
|
|
!29 = !MDLocation(line: 10, column: 9, scope: !20)
|
|
|
|
!30 = !MDLocation(line: 10, column: 5, scope: !20)
|
|
|
|
!31 = !MDLocation(line: 11, column: 5, scope: !20)
|
|
|
|
!32 = !MDLocation(line: 12, column: 3, scope: !10)
|
2015-03-03 17:24:31 +00:00
|
|
|
!33 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 7, arg: 0, scope: !23, file: !3, type: !26)
|
2015-01-14 22:27:36 +00:00
|
|
|
!34 = !MDLocation(line: 7, column: 11, scope: !23)
|
|
|
|
!35 = !MDLocation(line: 7, column: 19, scope: !36)
|
2015-03-03 17:24:31 +00:00
|
|
|
!36 = distinct !MDLexicalBlock(line: 7, column: 17, file: !38, scope: !23)
|
|
|
|
!38 = !MDFile(filename: "one.cc", directory: "/tmp")
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
|
|
|
!39 = !{i32 0}
|
2015-03-03 17:24:31 +00:00
|
|
|
!40 = !{i32 1, !"Debug Info Version", i32 3}
|