[llvm] r270111 - Simplify conditional unreachable into an assertion
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 13:28:43 PDT 2016
Author: dblaikie
Date: Thu May 19 15:28:40 2016
New Revision: 270111
URL: http://llvm.org/viewvc/llvm-project?rev=270111&view=rev
Log:
Simplify conditional unreachable into an assertion
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=270111&r1=270110&r2=270111&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp Thu May 19 15:28:40 2016
@@ -205,13 +205,9 @@ void HexagonInstPrinter::printSymbol(MCI
MCOperand const &MO = MI->getOperand(OpNo);
O << '#' << (hi ? "HI" : "LO") << '(';
- if (MO.isImm()) {
- O << '#';
- printOperand(MI, OpNo, O);
- } else {
- printOperand(MI, OpNo, O);
- llvm_unreachable("Unknown symbol operand");
- }
+ assert(MO.isImm() && "Unknown symbol operand");
+ O << '#';
+ printOperand(MI, OpNo, O);
O << ')';
}
More information about the llvm-commits
mailing list