[llvm] r311160 - [mips] Follow up comments on r310460
Simon Dardis via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 18 06:27:02 PDT 2017
Author: sdardis
Date: Fri Aug 18 06:27:02 2017
New Revision: 311160
URL: http://llvm.org/viewvc/llvm-project?rev=311160&view=rev
Log:
[mips] Follow up comments on r310460
Use dblaikie's suggestion of cast<> instead of a seperate assert.
Modified:
llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=311160&r1=311159&r2=311160&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Fri Aug 18 06:27:02 2017
@@ -5440,8 +5440,7 @@ bool MipsAsmParser::isEvaluated(const MC
case MCExpr::SymbolRef:
return (cast<MCSymbolRefExpr>(Expr)->getKind() != MCSymbolRefExpr::VK_None);
case MCExpr::Binary: {
- const MCBinaryExpr *BE = dyn_cast<MCBinaryExpr>(Expr);
- assert(BE && "Binary expression is not a binary expression?");
+ const MCBinaryExpr *BE = cast<MCBinaryExpr>(Expr);
if (!isEvaluated(BE->getLHS()))
return false;
return isEvaluated(BE->getRHS());
More information about the llvm-commits
mailing list