summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-07 22:29:10 +0000
committerChris Lattner <sabre@nondot.org>2010-04-07 22:29:10 +0000
commitb50e795369059fda30e084d90e9f1c8876c5cc50 (patch)
tree84219a770aa3d92e2390418c80f8787447931a66 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parentd006ab90dd86ff3bb0a6a20dcf399b3cc7082289 (diff)
downloadbcm5719-llvm-b50e795369059fda30e084d90e9f1c8876c5cc50.tar.gz
bcm5719-llvm-b50e795369059fda30e084d90e9f1c8876c5cc50.zip
tidy up
llvm-svn: 100700
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index df355c1d61c..1cc961a2982 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud