aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
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;
}
}