[llvm] r181339 - Debug Info: Fix for break due to r181271
David Blaikie
dblaikie at gmail.com
Tue May 7 12:21:41 PDT 2013
(green bot result:
http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/4719
)
On Tue, May 7, 2013 at 12:21 PM, David Blaikie <dblaikie at gmail.com> wrote:
> Eric - I assume you can be a reasonable approval for porting this to
> the release branch?
>
> Bill - upon that approval, please consider/merge this into the release branch.
>
> On Tue, May 7, 2013 at 10:57 AM, David Blaikie <dblaikie at gmail.com> wrote:
>> Author: dblaikie
>> Date: Tue May 7 12:57:13 2013
>> New Revision: 181339
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=181339&view=rev
>> Log:
>> Debug Info: Fix for break due to r181271
>>
>> Apparently we didn't keep an association of Compile Unit metadata nodes
>> to DIEs so looking up that parental context failed & thus caused no
>> DW_TAG_imported_modules to be emitted at the CU scope. Fix this by
>> adding the mapping & sure up the test case to verify this.
>>
>> Modified:
>> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>> llvm/trunk/test/DebugInfo/namespace.ll
>>
>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=181339&r1=181338&r2=181339&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue May 7 12:57:13 2013
>> @@ -685,6 +685,7 @@ CompileUnit *DwarfDebug::constructCompil
>> CompileUnit *NewCU = new CompileUnit(GlobalCUIndexCount++,
>> DIUnit.getLanguage(), Die, Asm,
>> this, &InfoHolder);
>> + NewCU->insertDIE(N, Die);
>>
>> FileIDCUMap[NewCU->getUniqueID()] = 0;
>> // Call this to emit a .file directive if it wasn't emitted for the source
>>
>> Modified: llvm/trunk/test/DebugInfo/namespace.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/namespace.ll?rev=181339&r1=181338&r2=181339&view=diff
>> ==============================================================================
>> --- llvm/trunk/test/DebugInfo/namespace.ll (original)
>> +++ llvm/trunk/test/DebugInfo/namespace.ll Tue May 7 12:57:13 2013
>> @@ -23,6 +23,8 @@
>> ; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F1]])
>> ; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x04)
>> ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS2]]})
>> +; CHECK: NULL
>> +; CHECK-NOT: NULL
>>
>> ; CHECK: DW_TAG_subprogram
>> ; CHECK-NEXT: DW_AT_MIPS_linkage_name
>> @@ -39,6 +41,15 @@
>> ; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]])
>> ; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x0b)
>> ; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS2]]})
>> +; CHECK: NULL
>> +; CHECK: NULL
>> +; CHECK-NOT: NULL
>> +
>> +; CHECK: DW_TAG_imported_module
>> +; Same bug as above, this should be F2, not F1
>> +; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F1]])
>> +; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x07)
>> +; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
>>
>> ; CHECK: file_names[ [[F1]]]{{.*}}debug-info-namespace.cpp
>> ; CHECK: file_names[ [[F2]]]{{.*}}foo.cpp
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list