Simplify assertion in XCoreInstPrinter.
[oota-llvm.git] / lib / Target / XCore / InstPrinter / XCoreInstPrinter.cpp
index 0ecbf63cc6552e8bdc6e2f302fb868dd1a81a4bc..1592351c3861c72a7d29de38e33bf85c1583ac06 100644 (file)
@@ -53,8 +53,9 @@ static void printExpr(const MCExpr *Expr, raw_ostream &OS) {
     const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(BE->getRHS());
     assert(SRE && CE && "Binary expression must be sym+const.");
     Offset = CE->getValue();
-  } else if (!(SRE = dyn_cast<MCSymbolRefExpr>(Expr))) {
-    assert(false && "Unexpected MCExpr type.");
+  } else {
+    SRE = dyn_cast<MCSymbolRefExpr>(Expr);
+    assert(SRE && "Unexpected MCExpr type.");
   }
   assert(SRE->getKind() == MCSymbolRefExpr::VK_None);