2013-04-10 19:53:26 +00:00
; REQUIRES: object-emission
2014-01-30 01:39:17 +00:00
; RUN: %llc_dwarf -O0 -filetype=obj < %s > %t
2013-03-20 19:39:15 +00:00
; RUN: llvm-dwarfdump %t | FileCheck %s
; CHECK: debug_info contents
2013-05-06 23:33:07 +00:00
; CHECK: [[NS1:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace
2013-03-20 06:27:06 +00:00
; CHECK-NEXT: DW_AT_name{{.*}} = "A"
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F1:".*debug-info-namespace.cpp"]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(5)
2013-03-20 05:15:37 +00:00
; CHECK-NOT: NULL
2013-04-22 06:12:31 +00:00
; CHECK: [[NS2:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace
2013-03-20 19:14:16 +00:00
; CHECK-NEXT: DW_AT_name{{.*}} = "B"
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2:".*foo.cpp"]])
2014-09-05 07:21:50 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(1)
2013-03-20 19:14:16 +00:00
; CHECK-NOT: NULL
2013-05-08 06:01:41 +00:00
; CHECK: [[I:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable
2013-03-20 05:15:37 +00:00
; CHECK-NEXT: DW_AT_name{{.*}}= "i"
2014-11-18 02:46:11 +00:00
; CHECK: [[VAR_FWD:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable
; CHECK-NEXT: DW_AT_name{{.*}}= "var_fwd"
2013-05-08 06:01:41 +00:00
; CHECK-NOT: NULL
2014-05-27 18:37:48 +00:00
; CHECK: [[FOO:0x[0-9a-f]*]]:{{ *}}DW_TAG_structure_type
; CHECK-NEXT: DW_AT_name{{.*}}= "foo"
; CHECK-NEXT: DW_AT_declaration
; CHECK-NOT: NULL
; CHECK: [[BAR:0x[0-9a-f]*]]:{{ *}}DW_TAG_structure_type
; CHECK-NEXT: DW_AT_name{{.*}}= "bar"
; CHECK: [[FUNC1:.*]]: DW_TAG_subprogram
2014-05-23 21:11:46 +00:00
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_MIPS_linkage_name
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name{{.*}}= "f1"
2014-11-18 02:46:11 +00:00
; CHECK: [[BAZ:0x[0-9a-f]*]]:{{.*}}DW_TAG_typedef
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name{{.*}}= "baz"
; CHECK: [[VAR_DECL:0x[0-9a-f]*]]:{{.*}}DW_TAG_variable
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name{{.*}}= "var_decl"
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_declaration
; CHECK: [[FUNC_DECL:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name{{.*}}= "func_decl"
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_declaration
; CHECK: [[FUNC_FWD:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name{{.*}}= "func_fwd"
; CHECK-NOT: DW_AT_declaration
2014-05-27 18:37:48 +00:00
; CHECK: DW_TAG_subprogram
2014-05-23 21:11:46 +00:00
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_MIPS_linkage_name
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name{{.*}}= "f1"
2013-05-08 06:01:41 +00:00
; CHECK: NULL
2013-05-06 23:33:07 +00:00
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_module
; This is a bug, it should be in F2 but it inherits the file from its
; enclosing scope
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F1]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(15)
2013-05-06 23:33:07 +00:00
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS2]]})
2013-05-07 17:57:13 +00:00
; CHECK: NULL
; CHECK-NOT: NULL
2013-05-06 23:33:07 +00:00
2014-05-27 18:37:48 +00:00
; CHECK: DW_TAG_imported_module
; Same bug as above, this should be F2, not F1
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F1]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(18)
2014-05-27 18:37:48 +00:00
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
; CHECK-NOT: NULL
2013-04-22 06:12:31 +00:00
; CHECK: DW_TAG_subprogram
2014-05-23 21:11:46 +00:00
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_MIPS_linkage_name
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name{{.*}}= "func"
2013-04-22 06:12:31 +00:00
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_module
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(26)
2013-05-06 23:33:07 +00:00
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
; CHECK-NOT: NULL
2013-05-08 06:01:41 +00:00
; CHECK: DW_TAG_imported_declaration
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(27)
2013-05-08 06:01:41 +00:00
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FOO]]})
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(28)
2013-05-08 06:01:41 +00:00
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[BAR]]})
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(29)
2013-05-08 06:01:41 +00:00
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC1]]})
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(30)
2013-05-08 06:01:41 +00:00
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[I]]})
; CHECK-NOT: NULL
2014-11-18 02:46:11 +00:00
; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
; CHECK-NEXT: DW_AT_decl_line{{.*}}(31)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[BAZ]]})
; CHECK-NOT: NULL
2014-04-06 06:29:01 +00:00
; CHECK: [[X:0x[0-9a-f]*]]:{{ *}}DW_TAG_imported_declaration
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(32)
2013-05-20 22:50:35 +00:00
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
; CHECK-NEXT: DW_AT_name{{.*}}"X"
; CHECK-NOT: NULL
2014-04-06 06:29:01 +00:00
; CHECK: DW_TAG_imported_declaration
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(33)
2013-05-20 22:50:35 +00:00
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[X]]})
; CHECK-NEXT: DW_AT_name{{.*}}"Y"
; CHECK-NOT: NULL
2014-11-18 02:46:11 +00:00
; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
; CHECK-NEXT: DW_AT_decl_line{{.*}}(34)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[VAR_DECL]]})
; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
; CHECK-NEXT: DW_AT_decl_line{{.*}}(35)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC_DECL]]})
; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
; CHECK-NEXT: DW_AT_decl_line{{.*}}(36)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[VAR_FWD]]})
; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
; CHECK-NEXT: DW_AT_decl_line{{.*}}(37)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC_FWD]]})
2013-05-06 23:33:07 +00:00
; CHECK: DW_TAG_lexical_block
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_module
2014-09-22 12:36:04 +00:00
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
2014-11-18 02:46:11 +00:00
; CHECK-NEXT: DW_AT_decl_line{{.*}}(23)
; CHECK-NEXT: DW_AT_import{{.*}}=>
2013-05-07 17:57:13 +00:00
; CHECK: NULL
; CHECK: NULL
2014-05-27 18:37:48 +00:00
; CHECK: NULL
2013-05-06 23:33:07 +00:00
2013-03-20 05:15:37 +00:00
; IR generated from clang/test/CodeGenCXX/debug-info-namespace.cpp, file paths
2013-05-08 06:01:41 +00:00
; changed to protect the guilty. The C++ source code is:
2014-11-18 02:46:11 +00:00
; // RUN...
; // RUN...
; // RUN...
;
2013-03-20 05:15:37 +00:00
; namespace A {
2013-03-20 19:14:16 +00:00
; #line 1 "foo.cpp"
; namespace B {
2014-11-18 02:46:11 +00:00
; extern int i;
; int f1() { return 0; }
2013-05-08 06:01:41 +00:00
; void f1(int) { }
; struct foo;
; struct bar { };
2014-11-18 02:46:11 +00:00
; typedef bar baz;
; extern int var_decl;
; void func_decl(void);
; extern int var_fwd;
; void func_fwd(void);
; }
2013-03-20 05:15:37 +00:00
; }
2014-11-18 02:46:11 +00:00
; namespace A {
2013-05-06 23:33:07 +00:00
; using namespace B;
2013-03-20 19:14:16 +00:00
; }
2013-04-22 06:12:31 +00:00
;
2013-05-06 23:33:07 +00:00
; using namespace A;
2014-11-18 02:46:11 +00:00
; namespace E = A;
; int B::i = f1();
2013-05-06 23:33:07 +00:00
; int func(bool b) {
; if (b) {
; using namespace A::B;
; return i;
; }
; using namespace A;
2013-05-08 06:01:41 +00:00
; using B::foo;
; using B::bar;
; using B::f1;
; using B::i;
2014-11-18 02:46:11 +00:00
; using B::baz;
2013-05-20 22:50:35 +00:00
; namespace X = A;
; namespace Y = X;
2014-11-18 02:46:11 +00:00
; using B::var_decl;
; using B::func_decl;
; using B::var_fwd;
; using B::func_fwd;
2013-05-20 22:50:35 +00:00
; return i + X::B::i + Y::B::i;
2013-04-22 06:12:31 +00:00
; }
2014-11-18 02:46:11 +00:00
;
; namespace A {
; using B::i;
; namespace B {
; int var_fwd = i;
; }
; }
; void B::func_fwd() {}
2013-05-08 06:01:41 +00:00
2013-03-20 19:14:16 +00:00
@_ZN1A1B1iE = global i32 0 , align 4
2014-11-18 02:46:11 +00:00
@_ZN1A1B7var_fwdE = global i32 0 , align 4
@llvm.global_ctors = appending global [ 1 x { i32 , void ( ) * , i8 * } ] [ { i32 , void ( ) * , i8 * } { i32 65535 , void ( ) * @_GLOBAL__sub_I_debug_info_namespace.cpp , i8 * null } ]
2013-03-20 05:15:37 +00:00
2014-11-18 02:46:11 +00:00
; Function Attrs: nounwind ssp uwtable
define i32 @_ZN1A1B2f1Ev ( ) #0 {
2013-05-08 06:01:41 +00:00
entry:
2014-11-18 02:46:11 +00:00
ret i32 0 , !dbg !60
2013-05-08 06:01:41 +00:00
}
2014-11-18 02:46:11 +00:00
; Function Attrs: nounwind ssp uwtable
2013-05-08 06:01:41 +00:00
define void @_ZN1A1B2f1Ei ( i32 ) #0 {
entry:
%.addr = alloca i32 , align 4
store i32 %0 , i32 * %.addr , align 4
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
call void @llvm.dbg.declare ( metadata i32 * %.addr , metadata !61 , metadata !62 ) , !dbg !63
2014-11-18 02:46:11 +00:00
ret void , !dbg !64
2013-05-08 06:01:41 +00:00
}
; Function Attrs: nounwind readnone
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 ) #1
2013-05-08 06:01:41 +00:00
2014-11-18 02:46:11 +00:00
define internal void @__cxx_global_var_init ( ) section "__TEXT,__StaticInit,regular,pure_instructions" {
entry:
%call = call i32 @_ZN1A1B2f1Ev ( ) , !dbg !65
store i32 %call , i32 * @_ZN1A1B1iE , align 4 , !dbg !65
ret void , !dbg !65
}
; Function Attrs: nounwind ssp uwtable
2013-05-06 23:33:07 +00:00
define i32 @_Z4funcb ( i1 zeroext %b ) #0 {
2013-04-22 06:12:31 +00:00
entry:
2013-05-06 23:33:07 +00:00
%retval = alloca i32 , align 4
%b.addr = alloca i8 , align 1
%frombool = zext i1 %b to i8
store i8 %frombool , i8 * %b.addr , align 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.
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
call void @llvm.dbg.declare ( metadata i8 * %b.addr , metadata !66 , metadata !62 ) , !dbg !67
2015-02-27 21:17:42 +00:00
%0 = load i8 , i8 * %b.addr , align 1 , !dbg !68
2014-11-18 02:46:11 +00:00
%tobool = trunc i8 %0 to i1 , !dbg !68
br i1 %tobool , label %if.then , label %if.end , !dbg !68
2013-05-06 23:33:07 +00:00
if.then: ; preds = %entry
2015-02-27 21:17:42 +00:00
%1 = load i32 , i32 * @_ZN1A1B1iE , align 4 , !dbg !69
2014-11-18 02:46:11 +00:00
store i32 %1 , i32 * %retval , !dbg !69
br label %return , !dbg !69
2013-05-06 23:33:07 +00:00
if.end: ; preds = %entry
2015-02-27 21:17:42 +00:00
%2 = load i32 , i32 * @_ZN1A1B1iE , align 4 , !dbg !70
%3 = load i32 , i32 * @_ZN1A1B1iE , align 4 , !dbg !70
2014-11-18 02:46:11 +00:00
%add = add nsw i32 %2 , %3 , !dbg !70
2015-02-27 21:17:42 +00:00
%4 = load i32 , i32 * @_ZN1A1B1iE , align 4 , !dbg !70
2014-11-18 02:46:11 +00:00
%add1 = add nsw i32 %add , %4 , !dbg !70
store i32 %add1 , i32 * %retval , !dbg !70
br label %return , !dbg !70
2013-05-06 23:33:07 +00:00
return: ; preds = %if.end, %if.then
2015-02-27 21:17:42 +00:00
%5 = load i32 , i32 * %retval , !dbg !71
2014-11-18 02:46:11 +00:00
ret i32 %5 , !dbg !71
}
define internal void @__cxx_global_var_init1 ( ) section "__TEXT,__StaticInit,regular,pure_instructions" {
entry:
2015-02-27 21:17:42 +00:00
%0 = load i32 , i32 * @_ZN1A1B1iE , align 4 , !dbg !72
2014-11-18 02:46:11 +00:00
store i32 %0 , i32 * @_ZN1A1B7var_fwdE , align 4 , !dbg !72
ret void , !dbg !72
}
; Function Attrs: nounwind ssp uwtable
define void @_ZN1A1B8func_fwdEv ( ) #0 {
entry:
ret void , !dbg !73
}
define internal void @_GLOBAL__sub_I_debug_info_namespace.cpp ( ) section "__TEXT,__StaticInit,regular,pure_instructions" {
entry:
call void @__cxx_global_var_init ( ) , !dbg !74
call void @__cxx_global_var_init1 ( ) , !dbg !74
ret void , !dbg !74
2013-04-22 06:12:31 +00:00
}
2014-11-18 02:46:11 +00:00
attributes #0 = { nounwind ssp 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" }
2013-05-06 23:33:07 +00:00
attributes #1 = { nounwind readnone }
2013-04-22 06:12:31 +00:00
2013-03-20 05:15:37 +00:00
!llvm.dbg.cu = ! { !0 }
2014-11-18 02:46:11 +00:00
!llvm.module.flags = ! { !57 , !58 }
!llvm.ident = ! { !59 }
2013-03-20 05:15:37 +00:00
2015-04-29 16:38:44 +00:00
!0 = !DICompileUnit ( 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: !9 , globals: !30 , imports: !33 )
!1 = !DIFile ( filename: "debug-info-namespace.cpp" , 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
!2 = ! { }
!3 = ! { !4 , !8 }
2015-04-29 16:38:44 +00:00
!4 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "foo" , line: 5 , flags: D I F l a g F w d D e c l , file: !5 , scope: !6 , identifier: "_ZTSN1A1B3fooE" )
!5 = !DIFile ( filename: "foo.cpp" , directory: "/tmp" )
!6 = !DINamespace ( name: "B" , line: 1 , file: !5 , scope: !7 )
!7 = !DINamespace ( name: "A" , line: 5 , file: !1 , scope: null )
!8 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "bar" , line: 6 , size: 8 , align: 8 , file: !5 , scope: !6 , elements: !2 , identifier: "_ZTSN1A1B3barE" )
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 , !14 , !17 , !21 , !25 , !26 , !27 }
2015-04-29 16:38:44 +00:00
!10 = !DISubprogram ( name: "f1" , linkageName: "_ZN1A1B2f1Ev" , line: 3 , isLocal: false , isDefinition: true , flags: D I F l a g P r o t o t y p e d , isOptimized: false , scopeLine: 3 , file: !5 , scope: !6 , type: !11 , function: i32 ( ) * @_ZN1A1B2f1Ev , variables: !2 )
!11 = !DISubroutineType ( 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 = ! { !13 }
2015-04-29 16:38:44 +00:00
!13 = !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 )
!14 = !DISubprogram ( name: "f1" , linkageName: "_ZN1A1B2f1Ei" , line: 4 , isLocal: false , isDefinition: true , flags: D I F l a g P r o t o t y p e d , isOptimized: false , scopeLine: 4 , file: !5 , scope: !6 , type: !15 , function: void ( i32 ) * @_ZN1A1B2f1Ei , variables: !2 )
!15 = !DISubroutineType ( types: !16 )
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
!16 = ! { null , !13 }
2015-04-29 16:38:44 +00:00
!17 = !DISubprogram ( name: "__cxx_global_var_init" , line: 20 , isLocal: true , isDefinition: true , flags: D I F l a g P r o t o t y p e d , isOptimized: false , scopeLine: 20 , file: !5 , scope: !18 , type: !19 , function: void ( ) * @__cxx_global_var_init , variables: !2 )
!18 = !DIFile ( filename: "foo.cpp" , directory: "/tmp" )
!19 = !DISubroutineType ( types: !20 )
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
!20 = ! { null }
2015-04-29 16:38:44 +00:00
!21 = !DISubprogram ( name: "func" , linkageName: "_Z4funcb" , line: 21 , isLocal: false , isDefinition: true , flags: D I F l a g P r o t o t y p e d , isOptimized: false , scopeLine: 21 , file: !5 , scope: !18 , type: !22 , function: i32 ( i1 ) * @_Z4funcb , variables: !2 )
!22 = !DISubroutineType ( types: !23 )
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
!23 = ! { !13 , !24 }
2015-04-29 16:38:44 +00:00
!24 = !DIBasicType ( tag: D W _ T A G _ b a s e _ type , name: "bool" , size: 8 , align: 8 , encoding: D W _ A T E _ b o o l e a n )
!25 = !DISubprogram ( name: "__cxx_global_var_init1" , line: 44 , isLocal: true , isDefinition: true , flags: D I F l a g P r o t o t y p e d , isOptimized: false , scopeLine: 44 , file: !5 , scope: !18 , type: !19 , function: void ( ) * @__cxx_global_var_init1 , variables: !2 )
!26 = !DISubprogram ( name: "func_fwd" , linkageName: "_ZN1A1B8func_fwdEv" , line: 47 , isLocal: false , isDefinition: true , flags: D I F l a g P r o t o t y p e d , isOptimized: false , scopeLine: 47 , file: !5 , scope: !6 , type: !19 , function: void ( ) * @_ZN1A1B8func_fwdEv , variables: !2 )
!27 = !DISubprogram ( name: "" , linkageName: "_GLOBAL__sub_I_debug_info_namespace.cpp" , isLocal: true , isDefinition: true , flags: D I F l a g A r t i f i c i a l , isOptimized: false , file: !1 , scope: !28 , type: !29 , function: void ( ) * @_GLOBAL__sub_I_debug_info_namespace.cpp , variables: !2 )
!28 = !DIFile ( filename: "debug-info-namespace.cpp" , directory: "/tmp" )
!29 = !DISubroutineType ( types: !2 )
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
!30 = ! { !31 , !32 }
2015-04-29 16:38:44 +00:00
!31 = !DIGlobalVariable ( name: "i" , linkageName: "_ZN1A1B1iE" , line: 20 , isLocal: false , isDefinition: true , scope: !6 , file: !18 , type: !13 , variable: i32 * @_ZN1A1B1iE )
!32 = !DIGlobalVariable ( name: "var_fwd" , linkageName: "_ZN1A1B7var_fwdE" , line: 44 , isLocal: false , isDefinition: true , scope: !6 , file: !18 , type: !13 , variable: i32 * @_ZN1A1B7var_fwdE )
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
!33 = ! { !34 , !35 , !36 , !37 , !40 , !41 , !42 , !43 , !44 , !45 , !47 , !48 , !49 , !51 , !54 , !55 , !56 }
2015-04-29 16:38:44 +00:00
!34 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ module , line: 15 , scope: !7 , entity: !6 )
!35 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ module , line: 18 , scope: !0 , entity: !7 )
!36 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 19 , name: "E" , scope: !0 , entity: !7 )
!37 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ module , line: 23 , scope: !38 , entity: !6 )
!38 = distinct !DILexicalBlock ( line: 22 , column: 10 , file: !5 , scope: !39 )
!39 = distinct !DILexicalBlock ( line: 22 , column: 7 , file: !5 , scope: !21 )
!40 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ module , line: 26 , scope: !21 , entity: !7 )
!41 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 27 , scope: !21 , entity: !"_ZTSN1A1B3fooE" )
!42 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 28 , scope: !21 , entity: !"_ZTSN1A1B3barE" )
!43 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 29 , scope: !21 , entity: !14 )
!44 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 30 , scope: !21 , entity: !31 )
!45 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 31 , scope: !21 , entity: !46 )
!46 = !DIDerivedType ( tag: D W _ T A G _ t y p e d e f , name: "baz" , line: 7 , file: !5 , scope: !6 , baseType: !"_ZTSN1A1B3barE" )
!47 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 32 , name: "X" , scope: !21 , entity: !7 )
!48 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 33 , name: "Y" , scope: !21 , entity: !47 )
!49 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 34 , scope: !21 , entity: !50 )
!50 = !DIGlobalVariable ( name: "var_decl" , linkageName: "_ZN1A1B8var_declE" , line: 8 , isLocal: false , isDefinition: false , scope: !6 , file: !18 , type: !13 )
!51 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 35 , scope: !21 , entity: !52 )
!52 = !DISubprogram ( name: "func_decl" , linkageName: "_ZN1A1B9func_declEv" , line: 9 , isLocal: false , isDefinition: false , flags: D I F l a g P r o t o t y p e d , isOptimized: false , file: !5 , scope: !6 , type: !19 , variables: !53 )
2015-03-03 17:24:31 +00:00
!53 = ! { } ; previously: invalid DW_TAG_base_type
2015-04-29 16:38:44 +00:00
!54 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 36 , scope: !21 , entity: !32 )
!55 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 37 , scope: !21 , entity: !26 )
!56 = !DIImportedEntity ( tag: D W _ T A G _ i m p o r t e d _ d e c l a r a t i o n , line: 42 , scope: !7 , entity: !31 )
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
!57 = ! { i32 2 , !"Dwarf Version" , i32 2 }
2015-03-03 17:24:31 +00:00
!58 = ! { i32 2 , !"Debug Info Version" , i32 3 }
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
!59 = ! { !"clang version 3.6.0 " }
2015-04-29 16:38:44 +00:00
!60 = !DILocation ( line: 3 , column: 12 , scope: !10 )
!61 = !DILocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "" , line: 4 , arg: 1 , scope: !14 , file: !18 , type: !13 )
!62 = !DIExpression ( )
!63 = !DILocation ( line: 4 , column: 12 , scope: !14 )
!64 = !DILocation ( line: 4 , column: 16 , scope: !14 )
!65 = !DILocation ( line: 20 , column: 12 , scope: !17 )
!66 = !DILocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "b" , line: 21 , arg: 1 , scope: !21 , file: !18 , type: !24 )
!67 = !DILocation ( line: 21 , column: 15 , scope: !21 )
!68 = !DILocation ( line: 22 , column: 7 , scope: !21 )
!69 = !DILocation ( line: 24 , column: 5 , scope: !38 )
!70 = !DILocation ( line: 38 , column: 3 , scope: !21 )
!71 = !DILocation ( line: 39 , column: 1 , scope: !21 )
!72 = !DILocation ( line: 44 , column: 15 , scope: !25 )
!73 = !DILocation ( line: 47 , column: 21 , scope: !26 )
!74 = !DILocation ( line: 0 , scope: !75 )
!75 = !DILexicalBlockFile ( discriminator: 0 , file: !5 , scope: !27 )