diff options
author | Devang Patel <dpatel@apple.com> | 2010-04-28 01:39:28 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-04-28 01:39:28 +0000 |
commit | 50c94312039ef53caf88ffb794be65f7bed08ade (patch) | |
tree | dee6b3206f50675c60adb9f77921f511c126e8a9 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 347e3b8f15c78e9550440378e97f3630a4fab32f (diff) | |
download | bcm5719-llvm-50c94312039ef53caf88ffb794be65f7bed08ade.tar.gz bcm5719-llvm-50c94312039ef53caf88ffb794be65f7bed08ade.zip |
Emit debug info for byval parameters.
llvm-svn: 102486
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 69b15bac75f..1a97ae77ebb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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; |