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
This commit is contained in:
Devang Patel 2011-04-25 22:52:55 +00:00
parent 6acd95b3c1
commit 2688e4aba6
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}
}