diff options
| author | Adrian Prantl <aprantl@apple.com> | 2013-04-30 22:16:46 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2013-04-30 22:16:46 +0000 |
| commit | 9a576644e4b86acc733f98ac069cc6a39ea8bf24 (patch) | |
| tree | c10d50b4ae350088bef4857526e874202729b7d6 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
| parent | dd77014acc05c77052934596063aa911e18fdbcb (diff) | |
| download | bcm5719-llvm-9a576644e4b86acc733f98ac069cc6a39ea8bf24.tar.gz bcm5719-llvm-9a576644e4b86acc733f98ac069cc6a39ea8bf24.zip | |
Change the informal convention of DBG_VALUE so that we can express a
register-indirect address with an offset of 0.
It used to be that a DBG_VALUE is a register-indirect value if the offset
(operand 1) is nonzero. The new convention is that a DBG_VALUE is
register-indirect if the first operand is a register and the second
operand is an immediate. For plain registers use the combination reg, reg.
rdar://problem/13658587
llvm-svn: 180816
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 4a71ad33373..284b6165d0c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -597,7 +597,9 @@ static bool emitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) { OS << AP.TM.getRegisterInfo()->getName(MI->getOperand(0).getReg()); } - OS << '+' << MI->getOperand(1).getImm(); + // It's only an offset if it's an immediate. + if (MI->getOperand(1).isImm()) + OS << '+' << MI->getOperand(1).getImm(); // NOTE: Want this comment at start of line, don't emit with AddComment. AP.OutStreamer.EmitRawText(OS.str()); return true; |

