[llvm] r185392 - Change if (cond) ... else llvm_unreachable("text") to assert(cond && "text") ...
Richard Trieu
rtrieu at google.com
Mon Jul 1 16:06:23 PDT 2013
Author: rtrieu
Date: Mon Jul 1 18:06:23 2013
New Revision: 185392
URL: http://llvm.org/viewvc/llvm-project?rev=185392&view=rev
Log:
Change if (cond) ... else llvm_unreachable("text") to assert(cond && "text") ...
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=185392&r1=185391&r2=185392&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp Mon Jul 1 18:06:23 2013
@@ -199,12 +199,10 @@ void HexagonInstPrinter::printSymbol(con
const MCOperand& MO = MI->getOperand(OpNo);
O << '#' << (hi? "HI": "LO") << '(';
- if (MO.isImm()) {
- O << '#';
- printOperand(MI, OpNo, O);
- } else {
- llvm_unreachable("Unknown symbol operand");
- printOperand(MI, OpNo, O);
- }
+
+ assert(MO.isImm() && "Unknown symbol operand");
+
+ O << '#';
+ printOperand(MI, OpNo, O);
O << ')';
}
More information about the llvm-commits
mailing list