LoadLibraryPermanently can theoretically throw an exception. Do not propagate
it out of 'ExecutionEngine::create'. This fixes a problem reported by coverity.
llvm-svn: 28293
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index a1ce4fc..4ea6230 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -247,7 +247,10 @@
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;