Intrinsic functions cannot throw
authorChris Lattner <sabre@nondot.org>
Fri, 13 Feb 2004 16:46:46 +0000 (16:46 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 13 Feb 2004 16:46:46 +0000 (16:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11383 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/PruneEH.cpp

index 7c4fc221c96bf6e71c754de122b88dc7a59fd1dd..cbe415960183fb421965aa9087248f8850de176d 100644 (file)
@@ -53,7 +53,7 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &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