[llvm] r270118 - Fix -Wunused-variable in non-Asserts build
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 13:44:22 PDT 2016
Author: dblaikie
Date: Thu May 19 15:44:22 2016
New Revision: 270118
URL: http://llvm.org/viewvc/llvm-project?rev=270118&view=rev
Log:
Fix -Wunused-variable in non-Asserts build
Modified:
llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp
Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp?rev=270118&r1=270117&r2=270118&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp Thu May 19 15:44:22 2016
@@ -202,10 +202,9 @@ void HexagonInstPrinter::printPredicateO
void HexagonInstPrinter::printSymbol(MCInst const *MI, unsigned OpNo,
raw_ostream &O, bool hi) const {
- MCOperand const &MO = MI->getOperand(OpNo);
+ assert(MI->getOperand(OpNo).isImm() && "Unknown symbol operand");
O << '#' << (hi ? "HI" : "LO") << '(';
- assert(MO.isImm() && "Unknown symbol operand");
O << '#';
printOperand(MI, OpNo, O);
O << ')';
More information about the llvm-commits
mailing list