diff options
author | Richard Osborne <richard@xmos.com> | 2012-12-17 12:13:46 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2012-12-17 12:13:46 +0000 |
commit | 26949489662d1f349a11809baace6b97eca0d3a2 (patch) | |
tree | df0a8b8fb3616d0caaedc6efc62b566bd7f4c04a /lib/Target/XCore | |
parent | b4d40a04f0639fdec8329a8708565411fa53b5bc (diff) | |
download | external_llvm-26949489662d1f349a11809baace6b97eca0d3a2.zip external_llvm-26949489662d1f349a11809baace6b97eca0d3a2.tar.gz external_llvm-26949489662d1f349a11809baace6b97eca0d3a2.tar.bz2 |
Simplify assertion in XCoreInstPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170321 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r-- | lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp b/lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp index 0ecbf63..1592351 100644 --- a/lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp +++ b/lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp @@ -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); |