From: Reid Kleckner Date: Fri, 3 Apr 2015 18:18:06 +0000 (+0000) Subject: [WinEH] Fold cast into assertion based on review feedback X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=36ae857dc67e9bfccf32b1b8170cd7794df06acd;p=oota-llvm.git [WinEH] Fold cast into assertion based on review feedback git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234034 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/WinEHPrepare.cpp b/lib/CodeGen/WinEHPrepare.cpp index b16da712cc9..c6caff3eadb 100644 --- a/lib/CodeGen/WinEHPrepare.cpp +++ b/lib/CodeGen/WinEHPrepare.cpp @@ -882,9 +882,8 @@ CloningDirector::CloningAction WinEHCatchDirector::handleBeginCatch( ExceptionObjectVar = Inst->getOperand(1)->stripPointerCasts(); if (isa(ExceptionObjectVar)) return CloningDirector::SkipInstruction; - AllocaInst *AI = dyn_cast(ExceptionObjectVar); - (void)AI; - assert(AI && AI->isStaticAlloca() && "catch parameter is not static alloca"); + assert(cast(ExceptionObjectVar)->isStaticAlloca() && + "catch parameter is not static alloca"); Materializer.escapeCatchObject(ExceptionObjectVar); return CloningDirector::SkipInstruction; }