aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-04-28 01:39:28 +0000
committerDevang Patel <dpatel@apple.com>2010-04-28 01:39:28 +0000
commit28ff35d030e2f49ff4e4b1544c015ebe011a530b (patch)
tree9c7d0f502660bd10243cb75425f6404cd00f5f16 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent8b1190a5400d263b5344f1fcd7b54ae1b6263e7c (diff)
Emit debug info for byval parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102486 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 69b15bac75..1a97ae77eb 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1602,6 +1602,15 @@ DIE *DwarfDebug::constructVariableDIE(DbgVariable *DV, DbgScope *Scope) {
updated = addConstantValue(VariableDie, DV, DVInsn->getOperand(0));
else if (DVInsn->getOperand(0).isFPImm())
updated = addConstantFPValue(VariableDie, DV, DVInsn->getOperand(0));
+ } else {
+ MachineLocation Location = Asm->getDebugValueLocation(DVInsn);
+ if (Location.getReg()) {
+ addAddress(VariableDie, dwarf::DW_AT_location, Location);
+ if (MCSymbol *VS = DV->getDbgValueLabel())
+ addLabel(VariableDie, dwarf::DW_AT_start_scope, dwarf::DW_FORM_addr,
+ VS);
+ updated = true;
+ }
}
if (!updated) {
// If variableDie is not updated then DBG_VALUE instruction does not
@@ -2102,10 +2111,6 @@ void DwarfDebug::collectVariableInfo() {
if (!MInsn->isDebugValue())
continue;
- // FIXME : Lift this restriction.
- if (MInsn->getNumOperands() != 3)
- continue;
-
// Ignore Undef values.
if (MInsn->getOperand(0).isReg() && !MInsn->getOperand(0).getReg())
continue;