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 | 2688e4aba65f6979521917af2c598eaa70906bae (patch) | |
tree | b53d793557e7709afcba38e8f01c93e66af053dd /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 6acd95b3c1c1a5298359a7df5d2c1f0b09baad17 (diff) | |
download | bcm5719-llvm-2688e4aba65f6979521917af2c598eaa70906bae.tar.gz bcm5719-llvm-2688e4aba65f6979521917af2c598eaa70906bae.zip |
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.
llvm-svn: 130167
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index ffcd2bccb94..325c3d34a55 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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; } } |