diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-07 22:29:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-07 22:29:10 +0000 |
commit | 00d139064e525221fdf0ff00d001ce8b584d69d6 (patch) | |
tree | 0ca25414bfb58dc2ec55d320167dc4c91a2af6e5 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 448db1cdef5872713ef77beffacf502ae3450cd7 (diff) | |
download | external_llvm-00d139064e525221fdf0ff00d001ce8b584d69d6.zip external_llvm-00d139064e525221fdf0ff00d001ce8b584d69d6.tar.gz external_llvm-00d139064e525221fdf0ff00d001ce8b584d69d6.tar.bz2 |
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index df355c1..1cc961a 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -466,7 +466,7 @@ static bool EmitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) { OS << '\t' << AP.MAI->getCommentString() << "DEBUG_VALUE: "; // cast away const; DIetc do not take const operands for some reason. - DIVariable V((MDNode*)(MI->getOperand(2).getMetadata())); + DIVariable V(const_cast<MDNode*>(MI->getOperand(2).getMetadata())); OS << V.getName() << " <- "; // Register or immediate value. Register 0 means undef. @@ -486,7 +486,8 @@ static bool EmitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) { } } else if (MI->getOperand(0).isImm()) { OS << MI->getOperand(0).getImm(); - } else if (MI->getOperand(0).isReg()) { + } else { + assert(MI->getOperand(0).isReg() && "Unknown operand type"); if (MI->getOperand(0).getReg() == 0) { // Suppress offset, it is not meaningful here. OS << "undef"; @@ -495,9 +496,8 @@ static bool EmitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) { return true; } OS << AP.TM.getRegisterInfo()->getName(MI->getOperand(0).getReg()); - } else - llvm_unreachable("Unknown operand type"); - + } + OS << '+' << MI->getOperand(1).getImm(); // NOTE: Want this comment at start of line, don't emit with AddComment. AP.OutStreamer.EmitRawText(OS.str()); |