<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Debug Info: for static member variables, add AT_MIPS_linkage_name to the<br>
definition DIE, to make old GDB happy.<br>
<br></blockquote><div><br></div><div style>Again, is this for compatibility or for correctness?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We have a regression for old GDB when Clang uses DW_TAG_member to declare<br>
static members inside a class, instead of DW_TAG_variable. This patch will fix<br>
this regression.<br><br></blockquote><div><br></div><div style>So, did you check the other uses of AT_MIPS_linkage_name?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<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=176143&r1=176142&r2=176143&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=176143&r1=176142&r2=176143&view=diff</a><br>


==============================================================================<br>
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Tue Feb 26 18:02:32 2013<br>
@@ -1348,9 +1348,15 @@ void CompileUnit::createGlobalVariableDI<br>
     }<br>
     // Add linkage name.<br>
     StringRef LinkageName = GV.getLinkageName();<br>
-    if (!LinkageName.empty() && isGlobalVariable)<br>
+    if (!LinkageName.empty() && isGlobalVariable) {<br>
       addString(VariableDIE, dwarf::DW_AT_MIPS_linkage_name,<br>
                 getRealLinkageName(LinkageName));<br>
+      // To make old GDB happy, for static member variables, we add<br>
+      // AT_MIPS_linkage_name to the definition DIE as well.<br></blockquote><div><br></div><div style>Can you explain this more? What's going on? What's the problem?</div><div style><br></div><div style>-eric</div>
</div></div></div>