[llvm] r234034 - [WinEH] Fold cast into assertion based on review feedback
Reid Kleckner
reid at kleckner.net
Fri Apr 3 11:18:06 PDT 2015
Author: rnk
Date: Fri Apr 3 13:18:06 2015
New Revision: 234034
URL: http://llvm.org/viewvc/llvm-project?rev=234034&view=rev
Log:
[WinEH] Fold cast into assertion based on review feedback
Modified:
llvm/trunk/lib/CodeGen/WinEHPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/WinEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/WinEHPrepare.cpp?rev=234034&r1=234033&r2=234034&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/WinEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/WinEHPrepare.cpp Fri Apr 3 13:18:06 2015
@@ -882,9 +882,8 @@ CloningDirector::CloningAction WinEHCatc
ExceptionObjectVar = Inst->getOperand(1)->stripPointerCasts();
if (isa<ConstantPointerNull>(ExceptionObjectVar))
return CloningDirector::SkipInstruction;
- AllocaInst *AI = dyn_cast<AllocaInst>(ExceptionObjectVar);
- (void)AI;
- assert(AI && AI->isStaticAlloca() && "catch parameter is not static alloca");
+ assert(cast<AllocaInst>(ExceptionObjectVar)->isStaticAlloca() &&
+ "catch parameter is not static alloca");
Materializer.escapeCatchObject(ExceptionObjectVar);
return CloningDirector::SkipInstruction;
}
More information about the llvm-commits
mailing list