diff options
author | Devang Patel <dpatel@apple.com> | 2011-04-25 22:52:55 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-04-25 22:52:55 +0000 |
commit | 80925f5dca36e34c6c28ae080d2fd2bf861fb346 (patch) | |
tree | c50f7665e776666702d969837c64ce1577959ea1 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 308bec390f4e6cba04ae06e2ca1a274c91a14f41 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index ffcd2bccb9..325c3d34a5 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -709,7 +709,11 @@ DIE *DwarfDebug::constructVariableDIE(DbgVariable *DV, DbgScope *Scope) { } 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; } } |