diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index 7c4fc221c96..cbe41596018 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -53,7 +53,7 @@ bool PruneEH::runOnSCC(const std::vector &SCC) { bool SCCMightThrow = false; for (unsigned i = 0, e = SCC.size(); !SCCMightThrow && i != e; ++i) if (Function *F = SCC[i]->getFunction()) - if (F->isExternal()) { + if (F->isExternal() && !F->getIntrinsicID()) { SCCMightThrow = true; } else { // Check to see if this function performs an unwind or calls an