From aab30e145403e1c2ea96877fe0fcff86d76d67cc Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 3 Apr 2015 18:18:06 +0000 Subject: [WinEH] Fold cast into assertion based on review feedback llvm-svn: 234034 --- llvm/lib/CodeGen/WinEHPrepare.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib') 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(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; } -- cgit v1.2.3