diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-04-30 22:35:14 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-04-30 22:35:14 +0000 |
commit | 86a87d9ba1faf153e0e6eaddfd3e95595c83bcb1 (patch) | |
tree | 47a19f014e0d437591cd4de7018bbb9b9fe17478 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | a2b56692c8b824b8cc4a0927bb555f3718e9bee8 (diff) |
Temporarily revert "Change the informal convention of DBG_VALUE so that we can express a"
because it breaks some buildbots.
This reverts commit 180816.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b8959adcde..ee6308c466 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1115,8 +1115,7 @@ static bool isDbgValueInDefinedReg(const MachineInstr *MI) { assert(MI->isDebugValue() && "Invalid DBG_VALUE machine instruction!"); return MI->getNumOperands() == 3 && MI->getOperand(0).isReg() && MI->getOperand(0).getReg() && - (MI->getOperand(1).isImm() || - (MI->getOperand(1).isReg() && MI->getOperand(1).getReg() == 0U)); + MI->getOperand(1).isImm() && MI->getOperand(1).getImm() == 0; } // Get .debug_loc entry for the instruction range starting at MI. @@ -1130,11 +1129,12 @@ static DotDebugLocEntry getDebugLocEntry(AsmPrinter *Asm, MachineLocation MLoc = Asm->getDebugValueLocation(MI); return DotDebugLocEntry(FLabel, SLabel, MLoc, Var); } - if (MI->getOperand(0).isReg()) { + if (MI->getOperand(0).isReg() && MI->getOperand(1).isImm()) { MachineLocation MLoc; - // If the second operand is an immediate, this is a - // register-indirect address. - if (!MI->getOperand(1).isImm()) + // TODO: Currently an offset of 0 in a DBG_VALUE means + // we need to generate a direct register value. + // There is no way to specify an indirect value with offset 0. + if (MI->getOperand(1).getImm() == 0) MLoc.set(MI->getOperand(0).getReg()); else MLoc.set(MI->getOperand(0).getReg(), MI->getOperand(1).getImm()); |