<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 17, 2014 at 6:46 PM, Frederic Riss <span dir="ltr"><<a href="mailto:friss@apple.com" target="_blank">friss@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: friss<br>
Date: Mon Nov 17 20:46:11 2014<br>
New Revision: 222217<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=222217&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=222217&view=rev</a><br>
Log:<br>
Allow DwarfCompileUnit::constructImportedEntityDIE to instanciate a GlobalVariable DIE.<br>
<br>
Usually global variables are in a retain list and instanciated before<br>
any call to constructImportedEntityDIE is made. This isn't true for<br>
forward declarations though.<br>
The testcase for this change is generated by a clang patched to emit<br>
such forward declarations (patch at <a href="http://reviews.llvm.org/D6173" target="_blank">http://reviews.llvm.org/D6173</a><br>
which will land soon). The updated testcase tests more than just<br>
global variables, it now tests every type of 'using' clause we<br>
support.<br></blockquote><div><br></div><div>Awesome, thanks a bunch!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Modified:<br>
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br>
llvm/trunk/test/DebugInfo/namespace.ll<br>
<br>
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=222217&r1=222216&r2=222217&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=222217&r1=222216&r2=222217&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Mon Nov 17 20:46:11 2014<br>
@@ -646,6 +646,8 @@ DwarfCompileUnit::constructImportedEntit<br>
EntityDie = getOrCreateSubprogramDIE(DISubprogram(Entity));<br>
else if (Entity.isType())<br>
EntityDie = getOrCreateTypeDIE(DIType(Entity));<br>
+ else if (Entity.isGlobalVariable())<br>
+ EntityDie = getOrCreateGlobalVariableDIE(DIGlobalVariable(Entity));<br></blockquote><div><br>Hmm, I'll have to keep this in mind when I'm fixing <a href="http://llvm.org/bugs/show_bug.cgi?id=21511">http://llvm.org/bugs/show_bug.cgi?id=21511</a> soon... (previously there was only one caller of getOrCreateGlobalVariableDIE and it didn't actually use the return value - granted, this caller will never pass a DW_TAG_member, unlike the existing caller which may/will have to be updated to pass those too... anyway)<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
else<br>
EntityDie = getDIE(Entity);<br>
assert(EntityDie);<br>
<br>
Modified: llvm/trunk/test/DebugInfo/namespace.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/namespace.ll?rev=222217&r1=222216&r2=222217&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/namespace.ll?rev=222217&r1=222216&r2=222217&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/DebugInfo/namespace.ll (original)<br>
+++ llvm/trunk/test/DebugInfo/namespace.ll Mon Nov 17 20:46:11 2014<br>
@@ -6,7 +6,7 @@<br>
; CHECK: [[NS1:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace<br>
; CHECK-NEXT: DW_AT_name{{.*}} = "A"<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F1:".*debug-info-namespace.cpp"]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(3)<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(5)<br>
; CHECK-NOT: NULL<br>
; CHECK: [[NS2:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace<br>
; CHECK-NEXT: DW_AT_name{{.*}} = "B"<br>
@@ -15,6 +15,8 @@<br>
; CHECK-NOT: NULL<br>
; CHECK: [[I:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable<br>
; CHECK-NEXT: DW_AT_name{{.*}}= "i"<br>
+; CHECK: [[VAR_FWD:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable<br>
+; CHECK-NEXT: DW_AT_name{{.*}}= "var_fwd"<br>
; CHECK-NOT: NULL<br>
; CHECK: [[FOO:0x[0-9a-f]*]]:{{ *}}DW_TAG_structure_type<br>
; CHECK-NEXT: DW_AT_name{{.*}}= "foo"<br>
@@ -22,12 +24,28 @@<br>
; CHECK-NOT: NULL<br>
; CHECK: [[BAR:0x[0-9a-f]*]]:{{ *}}DW_TAG_structure_type<br>
; CHECK-NEXT: DW_AT_name{{.*}}= "bar"<br>
-; CHECK: NULL<br>
; CHECK: [[FUNC1:.*]]: DW_TAG_subprogram<br>
; CHECK-NOT: DW_TAG<br>
; CHECK: DW_AT_MIPS_linkage_name<br>
; CHECK-NOT: DW_TAG<br>
; CHECK: DW_AT_name{{.*}}= "f1"<br>
+; CHECK: [[BAZ:0x[0-9a-f]*]]:{{.*}}DW_TAG_typedef<br>
+; CHECK-NOT: DW_TAG<br>
+; CHECK: DW_AT_name{{.*}}= "baz"<br>
+; CHECK: [[VAR_DECL:0x[0-9a-f]*]]:{{.*}}DW_TAG_variable<br>
+; CHECK-NOT: DW_TAG<br>
+; CHECK: DW_AT_name{{.*}}= "var_decl"<br>
+; CHECK-NOT: DW_TAG<br>
+; CHECK: DW_AT_declaration<br>
+; CHECK: [[FUNC_DECL:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram<br>
+; CHECK-NOT: DW_TAG<br>
+; CHECK: DW_AT_name{{.*}}= "func_decl"<br>
+; CHECK-NOT: DW_TAG<br>
+; CHECK: DW_AT_declaration<br>
+; CHECK: [[FUNC_FWD:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram<br>
+; CHECK-NOT: DW_TAG<br>
+; CHECK: DW_AT_name{{.*}}= "func_fwd"<br>
+; CHECK-NOT: DW_AT_declaration<br>
; CHECK: DW_TAG_subprogram<br>
; CHECK-NOT: DW_TAG<br>
; CHECK: DW_AT_MIPS_linkage_name<br>
@@ -40,7 +58,7 @@<br>
; This is a bug, it should be in F2 but it inherits the file from its<br>
; enclosing scope<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F1]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(8)<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(15)<br>
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS2]]})<br>
; CHECK: NULL<br>
; CHECK-NOT: NULL<br>
@@ -48,7 +66,7 @@<br>
; CHECK: DW_TAG_imported_module<br>
; Same bug as above, this should be F2, not F1<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F1]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(11)<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(18)<br>
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})<br>
; CHECK-NOT: NULL<br>
<br>
@@ -60,67 +78,101 @@<br>
; CHECK-NOT: NULL<br>
; CHECK: DW_TAG_imported_module<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(18)<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(26)<br>
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})<br>
; CHECK-NOT: NULL<br>
; CHECK: DW_TAG_imported_declaration<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(19)<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(27)<br>
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FOO]]})<br>
; CHECK-NOT: NULL<br>
; CHECK: DW_TAG_imported_declaration<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(20)<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(28)<br>
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[BAR]]})<br>
; CHECK-NOT: NULL<br>
; CHECK: DW_TAG_imported_declaration<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(21)<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(29)<br>
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC1]]})<br>
; CHECK-NOT: NULL<br>
; CHECK: DW_TAG_imported_declaration<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(22)<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(30)<br>
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[I]]})<br>
; CHECK-NOT: NULL<br>
+; CHECK: DW_TAG_imported_declaration<br>
+; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(31)<br>
+; CHECK-NEXT: DW_AT_import{{.*}}=> {[[BAZ]]})<br>
+; CHECK-NOT: NULL<br>
; CHECK: [[X:0x[0-9a-f]*]]:{{ *}}DW_TAG_imported_declaration<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(24)<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(32)<br>
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})<br>
; CHECK-NEXT: DW_AT_name{{.*}}"X"<br>
; CHECK-NOT: NULL<br>
; CHECK: DW_TAG_imported_declaration<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(25)<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(33)<br>
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[X]]})<br>
; CHECK-NEXT: DW_AT_name{{.*}}"Y"<br>
; CHECK-NOT: NULL<br>
+; CHECK: DW_TAG_imported_declaration<br>
+; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(34)<br>
+; CHECK-NEXT: DW_AT_import{{.*}}=> {[[VAR_DECL]]})<br>
+; CHECK: DW_TAG_imported_declaration<br>
+; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(35)<br>
+; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC_DECL]]})<br>
+; CHECK: DW_TAG_imported_declaration<br>
+; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(36)<br>
+; CHECK-NEXT: DW_AT_import{{.*}}=> {[[VAR_FWD]]})<br>
+; CHECK: DW_TAG_imported_declaration<br>
+; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(37)<br>
+; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC_FWD]]})<br>
+<br>
; CHECK: DW_TAG_lexical_block<br>
; CHECK-NOT: NULL<br>
; CHECK: DW_TAG_imported_module<br>
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])<br>
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(15)<br>
-; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS2]]})<br>
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(23)<br>
+; CHECK-NEXT: DW_AT_import{{.*}}=><br>
; CHECK: NULL<br>
; CHECK: NULL<br>
; CHECK: NULL<br>
<br>
; IR generated from clang/test/CodeGenCXX/debug-info-namespace.cpp, file paths<br>
; changed to protect the guilty. The C++ source code is:<br>
+; // RUN...<br>
+; // RUN...<br>
+; // RUN...<br>
+;<br>
; namespace A {<br>
; #line 1 "foo.cpp"<br>
; namespace B {<br>
-; int i;<br>
-; void f1() { }<br>
+; extern int i;<br>
+; int f1() { return 0; }<br>
; void f1(int) { }<br>
; struct foo;<br>
; struct bar { };<br>
+; typedef bar baz;<br>
+; extern int var_decl;<br>
+; void func_decl(void);<br>
+; extern int var_fwd;<br>
+; void func_fwd(void);<br>
+; }<br>
; }<br>
+; namespace A {<br>
; using namespace B;<br>
; }<br>
;<br>
; using namespace A;<br>
-;<br>
+; namespace E = A;<br>
+; int B::i = f1();<br>
; int func(bool b) {<br>
; if (b) {<br>
; using namespace A::B;<br>
@@ -131,123 +183,184 @@<br>
; using B::bar;<br>
; using B::f1;<br>
; using B::i;<br>
-; bar x;<br>
+; using B::baz;<br>
; namespace X = A;<br>
; namespace Y = X;<br>
+; using B::var_decl;<br>
+; using B::func_decl;<br>
+; using B::var_fwd;<br>
+; using B::func_fwd;<br>
; return i + X::B::i + Y::B::i;<br>
; }<br>
-<br>
-%"struct.A::B::bar" = type { i8 }<br>
+;<br>
+; namespace A {<br>
+; using B::i;<br>
+; namespace B {<br>
+; int var_fwd = i;<br>
+; }<br>
+; }<br>
+; void B::func_fwd() {}<br>
<br>
@_ZN1A1B1iE = global i32 0, align 4<br>
+@_ZN1A1B7var_fwdE = global i32 0, align 4<br>
+@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 }]<br>
<br>
-; Function Attrs: nounwind uwtable<br>
-define void @_ZN1A1B2f1Ev() #0 {<br>
+; Function Attrs: nounwind ssp uwtable<br>
+define i32 @_ZN1A1B2f1Ev() #0 {<br>
entry:<br>
- ret void, !dbg !41<br>
+ ret i32 0, !dbg !60<br>
}<br>
<br>
-; Function Attrs: nounwind uwtable<br>
+; Function Attrs: nounwind ssp uwtable<br>
define void @_ZN1A1B2f1Ei(i32) #0 {<br>
entry:<br>
%.addr = alloca i32, align 4<br>
store i32 %0, i32* %.addr, align 4<br>
- call void @llvm.dbg.declare(metadata !{i32* %.addr}, metadata !42, metadata !{metadata !"0x102"}), !dbg !43<br>
- ret void, !dbg !43<br>
+ call void @llvm.dbg.declare(metadata !{i32* %.addr}, metadata !61, metadata !62), !dbg !63<br>
+ ret void, !dbg !64<br>
}<br>
<br>
; Function Attrs: nounwind readnone<br>
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1<br>
<br>
-; Function Attrs: nounwind uwtable<br>
+define internal void @__cxx_global_var_init() section "__TEXT,__StaticInit,regular,pure_instructions" {<br>
+entry:<br>
+ %call = call i32 @_ZN1A1B2f1Ev(), !dbg !65<br>
+ store i32 %call, i32* @_ZN1A1B1iE, align 4, !dbg !65<br>
+ ret void, !dbg !65<br>
+}<br>
+<br>
+; Function Attrs: nounwind ssp uwtable<br>
define i32 @_Z4funcb(i1 zeroext %b) #0 {<br>
entry:<br>
%retval = alloca i32, align 4<br>
%b.addr = alloca i8, align 1<br>
- %x = alloca %"struct.A::B::bar", align 1<br>
%frombool = zext i1 %b to i8<br>
store i8 %frombool, i8* %b.addr, align 1<br>
- call void @llvm.dbg.declare(metadata !{i8* %b.addr}, metadata !44, metadata !{metadata !"0x102"}), !dbg !45<br>
- %0 = load i8* %b.addr, align 1, !dbg !46<br>
- %tobool = trunc i8 %0 to i1, !dbg !46<br>
- br i1 %tobool, label %if.then, label %if.end, !dbg !46<br>
+ call void @llvm.dbg.declare(metadata !{i8* %b.addr}, metadata !66, metadata !62), !dbg !67<br>
+ %0 = load i8* %b.addr, align 1, !dbg !68<br>
+ %tobool = trunc i8 %0 to i1, !dbg !68<br>
+ br i1 %tobool, label %if.then, label %if.end, !dbg !68<br>
<br>
if.then: ; preds = %entry<br>
- %1 = load i32* @_ZN1A1B1iE, align 4, !dbg !47<br>
- store i32 %1, i32* %retval, !dbg !47<br>
- br label %return, !dbg !47<br>
+ %1 = load i32* @_ZN1A1B1iE, align 4, !dbg !69<br>
+ store i32 %1, i32* %retval, !dbg !69<br>
+ br label %return, !dbg !69<br>
<br>
if.end: ; preds = %entry<br>
- call void @llvm.dbg.declare(metadata !{%"struct.A::B::bar"* %x}, metadata !48, metadata !{metadata !"0x102"}), !dbg !49<br>
- %2 = load i32* @_ZN1A1B1iE, align 4, !dbg !50<br>
- %3 = load i32* @_ZN1A1B1iE, align 4, !dbg !50<br>
- %add = add nsw i32 %2, %3, !dbg !50<br>
- %4 = load i32* @_ZN1A1B1iE, align 4, !dbg !50<br>
- %add1 = add nsw i32 %add, %4, !dbg !50<br>
- store i32 %add1, i32* %retval, !dbg !50<br>
- br label %return, !dbg !50<br>
+ %2 = load i32* @_ZN1A1B1iE, align 4, !dbg !70<br>
+ %3 = load i32* @_ZN1A1B1iE, align 4, !dbg !70<br>
+ %add = add nsw i32 %2, %3, !dbg !70<br>
+ %4 = load i32* @_ZN1A1B1iE, align 4, !dbg !70<br>
+ %add1 = add nsw i32 %add, %4, !dbg !70<br>
+ store i32 %add1, i32* %retval, !dbg !70<br>
+ br label %return, !dbg !70<br>
<br>
return: ; preds = %if.end, %if.then<br>
- %5 = load i32* %retval, !dbg !51<br>
- ret i32 %5, !dbg !51<br>
+ %5 = load i32* %retval, !dbg !71<br>
+ ret i32 %5, !dbg !71<br>
+}<br>
+<br>
+define internal void @__cxx_global_var_init1() section "__TEXT,__StaticInit,regular,pure_instructions" {<br>
+entry:<br>
+ %0 = load i32* @_ZN1A1B1iE, align 4, !dbg !72<br>
+ store i32 %0, i32* @_ZN1A1B7var_fwdE, align 4, !dbg !72<br>
+ ret void, !dbg !72<br>
+}<br>
+<br>
+; Function Attrs: nounwind ssp uwtable<br>
+define void @_ZN1A1B8func_fwdEv() #0 {<br>
+entry:<br>
+ ret void, !dbg !73<br>
+}<br>
+<br>
+define internal void @_GLOBAL__sub_I_debug_info_namespace.cpp() section "__TEXT,__StaticInit,regular,pure_instructions" {<br>
+entry:<br>
+ call void @__cxx_global_var_init(), !dbg !74<br>
+ call void @__cxx_global_var_init1(), !dbg !74<br>
+ ret void, !dbg !74<br>
}<br>
<br>
-attributes #0 = { nounwind 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" "unsafe-fp-math"="false" "use-soft-float"="false" }<br>
+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" }<br>
attributes #1 = { nounwind readnone }<br>
<br>
!<a href="http://llvm.dbg.cu" target="_blank">llvm.dbg.cu</a> = !{!0}<br>
-!llvm.module.flags = !{!52}<br>
+!llvm.module.flags = !{!57, !58}<br>
+!llvm.ident = !{!59}<br>
<br>
-!0 = metadata !{metadata !"0x11\004\00clang version 3.4 \000\00\000\00\000", metadata !1, metadata !2, metadata !2, metadata !3, metadata !19, metadata !21} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/blaikie/dev/llvm/build/clang/debug//usr/local/google/home/blaikie/dev/llvm/src/tools/clang/test/CodeGenCXX/debug-info-namespace.cpp] [DW_LANG_C_plus_plus]<br>
-!1 = metadata !{metadata !"/usr/local/google/home/blaikie/dev/llvm/src/tools/clang/test/CodeGenCXX/debug-info-namespace.cpp", metadata !"/usr/local/google/home/blaikie/dev/llvm/build/clang/debug"}<br>
+!0 = metadata !{metadata !"0x11\004\00clang version 3.6.0 \000\00\000\00\001", metadata !1, metadata !2, metadata !3, metadata !9, metadata !30, metadata !33} ; [ DW_TAG_compile_unit ] [/tmp/debug-info-namespace.cpp] [DW_LANG_C_plus_plus]<br>
+!1 = metadata !{metadata !"debug-info-namespace.cpp", metadata !"/tmp"}<br>
!2 = metadata !{}<br>
-!3 = metadata !{metadata !4, metadata !10, metadata !14}<br>
-!4 = metadata !{metadata !"0x2e\00f1\00f1\00_ZN1A1B2f1Ev\003\000\001\000\006\00256\000\003", metadata !5, metadata !6, metadata !8, null, void ()* @_ZN1A1B2f1Ev, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 3] [def] [f1]<br>
-!5 = metadata !{metadata !"foo.cpp", metadata !"/usr/local/google/home/blaikie/dev/llvm/build/clang/debug"}<br>
+!3 = metadata !{metadata !4, metadata !8}<br>
+!4 = metadata !{metadata !"0x13\00foo\005\000\000\000\004\000", metadata !5, metadata !6, null, null, null, null, metadata !"_ZTSN1A1B3fooE"} ; [ DW_TAG_structure_type ] [foo] [line 5, size 0, align 0, offset 0] [decl] [from ]<br>
+!5 = metadata !{metadata !"foo.cpp", metadata !"/tmp"}<br>
!6 = metadata !{metadata !"0x39\00B\001", metadata !5, metadata !7} ; [ DW_TAG_namespace ] [B] [line 1]<br>
-!7 = metadata !{metadata !"0x39\00A\003", metadata !1, null} ; [ DW_TAG_namespace ] [A] [line 3]<br>
-!8 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !9, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br>
-!9 = metadata !{null}<br>
-!10 = metadata !{metadata !"0x2e\00f1\00f1\00_ZN1A1B2f1Ei\004\000\001\000\006\00256\000\004", metadata !5, metadata !6, metadata !11, null, void (i32)* @_ZN1A1B2f1Ei, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 4] [def] [f1]<br>
-!11 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !12, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br>
-!12 = metadata !{null, metadata !13}<br>
+!7 = metadata !{metadata !"0x39\00A\005", metadata !1, null} ; [ DW_TAG_namespace ] [A] [line 5]<br>
+!8 = metadata !{metadata !"0x13\00bar\006\008\008\000\000\000", metadata !5, metadata !6, null, metadata !2, null, null, metadata !"_ZTSN1A1B3barE"} ; [ DW_TAG_structure_type ] [bar] [line 6, size 8, align 8, offset 0] [def] [from ]<br>
+!9 = metadata !{metadata !10, metadata !14, metadata !17, metadata !21, metadata !25, metadata !26, metadata !27}<br>
+!10 = metadata !{metadata !"0x2e\00f1\00f1\00_ZN1A1B2f1Ev\003\000\001\000\000\00256\000\003", metadata !5, metadata !6, metadata !11, null, i32 ()* @_ZN1A1B2f1Ev, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 3] [def] [f1]<br>
+!11 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", null, null, null, metadata !12, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br>
+!12 = metadata !{metadata !13}<br>
!13 = metadata !{metadata !"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]<br>
-!14 = metadata !{metadata !"0x2e\00func\00func\00_Z4funcb\0013\000\001\000\006\00256\000\0013", metadata !5, metadata !15, metadata !16, null, i32 (i1)* @_Z4funcb, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 13] [def] [func]<br>
-!15 = metadata !{metadata !"0x29", metadata !5} ; [ DW_TAG_file_type ] [/usr/local/google/home/blaikie/dev/llvm/build/clang/debug/foo.cpp]<br>
-!16 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !17, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br>
-!17 = metadata !{metadata !13, metadata !18}<br>
-!18 = metadata !{metadata !"0x24\00bool\000\008\008\000\000\002", null, null} ; [ DW_TAG_base_type ] [bool] [line 0, size 8, align 8, offset 0, enc DW_ATE_boolean]<br>
-!19 = metadata !{metadata !20}<br>
-!20 = metadata !{metadata !"0x34\00i\00i\00_ZN1A1B1iE\002\000\001", metadata !6, metadata !15, metadata !13, i32* @_ZN1A1B1iE, null} ; [ DW_TAG_variable ] [i] [line 2] [def]<br>
-!21 = metadata !{metadata !22, metadata !23, metadata !24, metadata !26, metadata !27, metadata !29, metadata !37, metadata !38, metadata !39, metadata !40}<br>
-!22 = metadata !{metadata !"0x3a\008\00", metadata !7, metadata !6} ; [ DW_TAG_imported_module ]<br>
-!23 = metadata !{metadata !"0x3a\0011\00", metadata !0, metadata !7} ; [ DW_TAG_imported_module ]<br>
-!24 = metadata !{metadata !"0x3a\0015\00", metadata !25, metadata !6} ; [ DW_TAG_imported_module ]<br>
-!25 = metadata !{metadata !"0xb\0014\000\000", metadata !5, metadata !14} ; [ DW_TAG_lexical_block ] [/usr/local/google/home/blaikie/dev/llvm/build/clang/debug/foo.cpp]<br>
-!26 = metadata !{metadata !"0x3a\0018\00", metadata !14, metadata !7} ; [ DW_TAG_imported_module ]<br>
-!27 = metadata !{metadata !"0x8\0019\00", metadata !14, metadata !28} ; [ DW_TAG_imported_declaration ]<br>
-!28 = metadata !{metadata !"0x13\00foo\005\000\000\000\004\000", metadata !5, metadata !6, null, null, null, null, null} ; [ DW_TAG_structure_type ] [foo] [line 5, size 0, align 0, offset 0] [decl] [from ]<br>
-!29 = metadata !{metadata !"0x8\0020\00", metadata !14, metadata !30} ; [ DW_TAG_imported_declaration ]<br>
-!30 = metadata !{metadata !"0x13\00bar\006\008\008\000\000\000", metadata !5, metadata !6, null, metadata !31, null, null, null} ; [ DW_TAG_structure_type ] [bar] [line 6, size 8, align 8, offset 0] [def] [from ]<br>
-!31 = metadata !{metadata !32}<br>
-!32 = metadata !{metadata !"0x2e\00bar\00bar\00\006\000\000\000\006\00320\000\006", metadata !5, metadata !30, metadata !33, null, null, null, i32 0, metadata !36} ; [ DW_TAG_subprogram ] [line 6] [bar]<br>
-!33 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !34, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br>
-!34 = metadata !{null, metadata !35}<br>
-!35 = metadata !{metadata !"0xf\00\000\0064\0064\000\001088", i32 0, null, metadata !30} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from bar]<br>
-!36 = metadata !{i32 786468}<br>
-!37 = metadata !{metadata !"0x8\0021\00", metadata !14, metadata !10} ; [ DW_TAG_imported_declaration ]<br>
-!38 = metadata !{metadata !"0x8\0022\00", metadata !14, metadata !20} ; [ DW_TAG_imported_declaration ]<br>
-!39 = metadata !{metadata !"0x8\0024\00X", metadata !14, metadata !7} ; [ DW_TAG_imported_declaration ]<br>
-!40 = metadata !{metadata !"0x8\0025\00Y", metadata !14, metadata !39} ; [ DW_TAG_imported_declaration ]<br>
-!41 = metadata !{i32 3, i32 0, metadata !4, null}<br>
-!42 = metadata !{metadata !"0x101\00\0016777220\000", metadata !10, metadata !15, metadata !13} ; [ DW_TAG_arg_variable ] [line 4]<br>
-!43 = metadata !{i32 4, i32 0, metadata !10, null}<br>
-!44 = metadata !{metadata !"0x101\00b\0016777229\000", metadata !14, metadata !15, metadata !18} ; [ DW_TAG_arg_variable ] [b] [line 13]<br>
-!45 = metadata !{i32 13, i32 0, metadata !14, null}<br>
-!46 = metadata !{i32 14, i32 0, metadata !14, null}<br>
-!47 = metadata !{i32 16, i32 0, metadata !25, null}<br>
-!48 = metadata !{metadata !"0x100\00x\0023\000", metadata !14, metadata !15, metadata !30} ; [ DW_TAG_auto_variable ] [x] [line 23]<br>
-!49 = metadata !{i32 23, i32 0, metadata !14, null}<br>
-!50 = metadata !{i32 26, i32 0, metadata !14, null}<br>
-!51 = metadata !{i32 27, i32 0, metadata !14, null}<br>
-!52 = metadata !{i32 1, metadata !"Debug Info Version", i32 2}<br>
+!14 = metadata !{metadata !"0x2e\00f1\00f1\00_ZN1A1B2f1Ei\004\000\001\000\000\00256\000\004", metadata !5, metadata !6, metadata !15, null, void (i32)* @_ZN1A1B2f1Ei, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 4] [def] [f1]<br>
+!15 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", null, null, null, metadata !16, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br>
+!16 = metadata !{null, metadata !13}<br>
+!17 = metadata !{metadata !"0x2e\00__cxx_global_var_init\00__cxx_global_var_init\00\0020\001\001\000\000\00256\000\0020", metadata !5, metadata !18, metadata !19, null, void ()* @__cxx_global_var_init, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 20] [local] [def] [__cxx_global_var_init]<br>
+!18 = metadata !{metadata !"0x29", metadata !5} ; [ DW_TAG_file_type ] [/tmp/foo.cpp]<br>
+!19 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", null, null, null, metadata !20, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br>
+!20 = metadata !{null}<br>
+!21 = metadata !{metadata !"0x2e\00func\00func\00_Z4funcb\0021\000\001\000\000\00256\000\0021", metadata !5, metadata !18, metadata !22, null, i32 (i1)* @_Z4funcb, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 21] [def] [func]<br>
+!22 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", null, null, null, metadata !23, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br>
+!23 = metadata !{metadata !13, metadata !24}<br>
+!24 = metadata !{metadata !"0x24\00bool\000\008\008\000\000\002", null, null} ; [ DW_TAG_base_type ] [bool] [line 0, size 8, align 8, offset 0, enc DW_ATE_boolean]<br>
+!25 = metadata !{metadata !"0x2e\00__cxx_global_var_init1\00__cxx_global_var_init1\00\0044\001\001\000\000\00256\000\0044", metadata !5, metadata !18, metadata !19, null, void ()* @__cxx_global_var_init1, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 44] [local] [def] [__cxx_global_var_init1]<br>
+!26 = metadata !{metadata !"0x2e\00func_fwd\00func_fwd\00_ZN1A1B8func_fwdEv\0047\000\001\000\000\00256\000\0047", metadata !5, metadata !6, metadata !19, null, void ()* @_ZN1A1B8func_fwdEv, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 47] [def] [func_fwd]<br>
+!27 = metadata !{metadata !"0x2e\00\00\00_GLOBAL__sub_I_debug_info_namespace.cpp\000\001\001\000\000\0064\000\000", metadata !1, metadata !28, metadata !29, null, void ()* @_GLOBAL__sub_I_debug_info_namespace.cpp, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 0] [local] [def]<br>
+!28 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [/tmp/debug-info-namespace.cpp]<br>
+!29 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", null, null, null, metadata !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br>
+!30 = metadata !{metadata !31, metadata !32}<br>
+!31 = metadata !{metadata !"0x34\00i\00i\00_ZN1A1B1iE\0020\000\001", metadata !6, metadata !18, metadata !13, i32* @_ZN1A1B1iE, null} ; [ DW_TAG_variable ] [i] [line 20] [def]<br>
+!32 = metadata !{metadata !"0x34\00var_fwd\00var_fwd\00_ZN1A1B7var_fwdE\0044\000\001", metadata !6, metadata !18, metadata !13, i32* @_ZN1A1B7var_fwdE, null} ; [ DW_TAG_variable ] [var_fwd] [line 44] [def]<br>
+!33 = metadata !{metadata !34, metadata !35, metadata !36, metadata !37, metadata !40, metadata !41, metadata !42, metadata !43, metadata !44, metadata !45, metadata !47, metadata !48, metadata !49, metadata !51, metadata !54, metadata !55, metadata !56}<br>
+!34 = metadata !{metadata !"0x3a\0015\00", metadata !7, metadata !6} ; [ DW_TAG_imported_module ]<br>
+!35 = metadata !{metadata !"0x3a\0018\00", metadata !0, metadata !7} ; [ DW_TAG_imported_module ]<br>
+!36 = metadata !{metadata !"0x8\0019\00E", metadata !0, metadata !7} ; [ DW_TAG_imported_declaration ]<br>
+!37 = metadata !{metadata !"0x3a\0023\00", metadata !38, metadata !6} ; [ DW_TAG_imported_module ]<br>
+!38 = metadata !{metadata !"0xb\0022\0010\001", metadata !5, metadata !39} ; [ DW_TAG_lexical_block ] [/tmp/foo.cpp]<br>
+!39 = metadata !{metadata !"0xb\0022\007\000", metadata !5, metadata !21} ; [ DW_TAG_lexical_block ] [/tmp/foo.cpp]<br>
+!40 = metadata !{metadata !"0x3a\0026\00", metadata !21, metadata !7} ; [ DW_TAG_imported_module ]<br>
+!41 = metadata !{metadata !"0x8\0027\00", metadata !21, metadata !"_ZTSN1A1B3fooE"} ; [ DW_TAG_imported_declaration ]<br>
+!42 = metadata !{metadata !"0x8\0028\00", metadata !21, metadata !"_ZTSN1A1B3barE"} ; [ DW_TAG_imported_declaration ]<br>
+!43 = metadata !{metadata !"0x8\0029\00", metadata !21, metadata !14} ; [ DW_TAG_imported_declaration ]<br>
+!44 = metadata !{metadata !"0x8\0030\00", metadata !21, metadata !31} ; [ DW_TAG_imported_declaration ]<br>
+!45 = metadata !{metadata !"0x8\0031\00", metadata !21, metadata !46} ; [ DW_TAG_imported_declaration ]<br>
+!46 = metadata !{metadata !"0x16\00baz\007\000\000\000\000", metadata !5, metadata !6, metadata !"_ZTSN1A1B3barE"} ; [ DW_TAG_typedef ] [baz] [line 7, size 0, align 0, offset 0] [from _ZTSN1A1B3barE]<br>
+!47 = metadata !{metadata !"0x8\0032\00X", metadata !21, metadata !7} ; [ DW_TAG_imported_declaration ]<br>
+!48 = metadata !{metadata !"0x8\0033\00Y", metadata !21, metadata !47} ; [ DW_TAG_imported_declaration ]<br>
+!49 = metadata !{metadata !"0x8\0034\00", metadata !21, metadata !50} ; [ DW_TAG_imported_declaration ]<br>
+!50 = metadata !{metadata !"0x34\00var_decl\00var_decl\00_ZN1A1B8var_declE\008\000\000", metadata !6, metadata !18, metadata !13, null, null} ; [ DW_TAG_variable ] [var_decl] [line 8]<br>
+!51 = metadata !{metadata !"0x8\0035\00", metadata !21, metadata !52} ; [ DW_TAG_imported_declaration ]<br>
+!52 = metadata !{metadata !"0x2e\00func_decl\00func_decl\00_ZN1A1B9func_declEv\009\000\000\000\000\00256\000\000", metadata !5, metadata !6, metadata !19, null, null, null, null, metadata !53} ; [ DW_TAG_subprogram ] [line 9] [scope 0] [func_decl]<br>
+!53 = metadata !{metadata !"0x24"}<br>
+!54 = metadata !{metadata !"0x8\0036\00", metadata !21, metadata !32} ; [ DW_TAG_imported_declaration ]<br>
+!55 = metadata !{metadata !"0x8\0037\00", metadata !21, metadata !26} ; [ DW_TAG_imported_declaration ]<br>
+!56 = metadata !{metadata !"0x8\0042\00", metadata !7, metadata !31} ; [ DW_TAG_imported_declaration ]<br>
+!57 = metadata !{i32 2, metadata !"Dwarf Version", i32 2}<br>
+!58 = metadata !{i32 2, metadata !"Debug Info Version", i32 2}<br>
+!59 = metadata !{metadata !"clang version 3.6.0 "}<br>
+!60 = metadata !{i32 3, i32 12, metadata !10, null}<br>
+!61 = metadata !{metadata !"0x101\00\0016777220\000", metadata !14, metadata !18, metadata !13} ; [ DW_TAG_arg_variable ] [line 4]<br>
+!62 = metadata !{metadata !"0x102"} ; [ DW_TAG_expression ]<br>
+!63 = metadata !{i32 4, i32 12, metadata !14, null}<br>
+!64 = metadata !{i32 4, i32 16, metadata !14, null}<br>
+!65 = metadata !{i32 20, i32 12, metadata !17, null}<br>
+!66 = metadata !{metadata !"0x101\00b\0016777237\000", metadata !21, metadata !18, metadata !24} ; [ DW_TAG_arg_variable ] [b] [line 21]<br>
+!67 = metadata !{i32 21, i32 15, metadata !21, null}<br>
+!68 = metadata !{i32 22, i32 7, metadata !21, null}<br>
+!69 = metadata !{i32 24, i32 5, metadata !38, null}<br>
+!70 = metadata !{i32 38, i32 3, metadata !21, null}<br>
+!71 = metadata !{i32 39, i32 1, metadata !21, null}<br>
+!72 = metadata !{i32 44, i32 15, metadata !25, null}<br>
+!73 = metadata !{i32 47, i32 21, metadata !26, null}<br>
+!74 = metadata !{i32 0, i32 0, metadata !75, null}<br>
+!75 = metadata !{metadata !"0xb\000", metadata !5, metadata !27} ; [ DW_TAG_lexical_block ] [/tmp/foo.cpp]<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>