[llvm-commits] [llvm] r130167 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Devang Patel dpatel at apple.com
Mon Apr 25 15:52:55 PDT 2011


Author: dpatel
Date: Mon Apr 25 17:52:55 2011
New Revision: 130167

URL: http://llvm.org/viewvc/llvm-project?rev=130167&view=rev
Log:
Do not drop a variable's complex address if it is not based on frame base.
Observed this while reading code, so I do not have a test case handy here.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=130167&r1=130166&r2=130167&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Apr 25 17:52:55 2011
@@ -709,7 +709,11 @@
     } else {
       MachineLocation Location = Asm->getDebugValueLocation(DVInsn);
       if (Location.getReg()) {
-        TheCU->addAddress(VariableDie, dwarf::DW_AT_location, Location);
+        if (DV->getVariable().hasComplexAddress())
+          TheCU->addComplexAddress(DV, VariableDie, dwarf::DW_AT_location, 
+                                   Location);
+        else
+          TheCU->addAddress(VariableDie, dwarf::DW_AT_location, Location);
         updated = true;
       }
     }





More information about the llvm-commits mailing list