LoadLibraryPermanently can theoretically throw an exception. Do not propagate
authorChris Lattner <sabre@nondot.org>
Sun, 14 May 2006 19:01:55 +0000 (19:01 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 14 May 2006 19:01:55 +0000 (19:01 +0000)
it out of 'ExecutionEngine::create'.  This fixes a problem reported by coverity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28293 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/ExecutionEngine.cpp

index a1ce4fca184734ab508b88d593724e382c80a38d..4ea62307113c638fe36d480b9cf641c5f1940c02 100644 (file)
@@ -247,7 +247,10 @@ ExecutionEngine *ExecutionEngine::create(ModuleProvider *MP,
   if (EE) {
     // Make sure we can resolve symbols in the program as well. The zero arg
     // to the function tells DynamicLibrary to load the program, not a library.
-    sys::DynamicLibrary::LoadLibraryPermanently(0);
+    try {
+      sys::DynamicLibrary::LoadLibraryPermanently(0);
+    } catch (...) {
+    }
   }
 
   return EE;