From 8c93d5b602377e9860c32a1367fc697d9684e3ee Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 20 Sep 2011 20:20:50 +0000 Subject: [PATCH] Check the terminator, not the basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140176 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/LoopExtractor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp index f90d1b32b35..714282b2b5e 100644 --- a/lib/Transforms/IPO/LoopExtractor.cpp +++ b/lib/Transforms/IPO/LoopExtractor.cpp @@ -278,7 +278,8 @@ bool BlockExtractorPass::runOnModule(Module &M) { for (unsigned i = 0, e = BlocksToExtract.size(); i != e; ++i) { SmallVector BlocksToExtractVec; BlocksToExtractVec.push_back(BlocksToExtract[i]); - if (const InvokeInst *II = dyn_cast(BlocksToExtract[i])) + if (const InvokeInst *II = + dyn_cast(BlocksToExtract[i]->getTerminator())) BlocksToExtractVec.push_back(II->getUnwindDest()); ExtractBasicBlock(BlocksToExtractVec); } -- 2.34.1