summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-04-03 18:18:06 +0000
committerReid Kleckner <reid@kleckner.net>2015-04-03 18:18:06 +0000
commitaab30e145403e1c2ea96877fe0fcff86d76d67cc (patch)
treeefaf6c31f38aba8e919fb92636188037d7e66629 /llvm/lib/CodeGen
parent2738278b7f34df9cf29f1ffffc4c87b00fdd0976 (diff)
downloadbcm5719-llvm-aab30e145403e1c2ea96877fe0fcff86d76d67cc.tar.gz
bcm5719-llvm-aab30e145403e1c2ea96877fe0fcff86d76d67cc.zip
[WinEH] Fold cast into assertion based on review feedback
llvm-svn: 234034
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/WinEHPrepare.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp
index b16da712cc9..c6caff3eadb 100644
--- a/llvm/lib/CodeGen/WinEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WinEHPrepare.cpp
@@ -882,9 +882,8 @@ CloningDirector::CloningAction WinEHCatchDirector::handleBeginCatch(
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;
}
OpenPOWER on IntegriCloud