[llvm] r185445 - Hexagon: Avoid unused variable warnings in Release builds.
Benjamin Kramer
benny.kra at googlemail.com
Tue Jul 2 10:24:00 PDT 2013
Author: d0k
Date: Tue Jul 2 12:24:00 2013
New Revision: 185445
URL: http://llvm.org/viewvc/llvm-project?rev=185445&view=rev
Log:
Hexagon: Avoid unused variable warnings in Release builds.
Modified:
llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp
Modified: llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp?rev=185445&r1=185444&r2=185445&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp Tue Jul 2 12:24:00 2013
@@ -196,13 +196,9 @@ void HexagonInstPrinter::printPredicateO
void HexagonInstPrinter::printSymbol(const MCInst *MI, unsigned OpNo,
raw_ostream &O, bool hi) const {
- const MCOperand& MO = MI->getOperand(OpNo);
+ assert(MI->getOperand(OpNo).isImm() && "Unknown symbol operand");
- O << '#' << (hi? "HI": "LO") << '(';
-
- assert(MO.isImm() && "Unknown symbol operand");
-
- O << '#';
+ O << '#' << (hi ? "HI" : "LO") << "(#";
printOperand(MI, OpNo, O);
O << ')';
}
More information about the llvm-commits
mailing list