From 4d1f38fb2671e565b7aaeb2dd0db79b16adc3349 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 5 Jun 2009 05:46:00 +0000 Subject: Remove some unnecessary uses of C++ exceptions. - PR4264. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72922 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Core/ExternalDispatcher.cpp | 6 +----- lib/Module/ModuleUtil.cpp | 18 +++++++----------- 2 files changed, 8 insertions(+), 16 deletions(-) (limited to 'lib') diff --git a/lib/Core/ExternalDispatcher.cpp b/lib/Core/ExternalDispatcher.cpp index 9e3b0a49..eb60dcff 100644 --- a/lib/Core/ExternalDispatcher.cpp +++ b/lib/Core/ExternalDispatcher.cpp @@ -80,11 +80,7 @@ ExternalDispatcher::ExternalDispatcher() { if (executionEngine) { // 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. - try { - dl_symbols.LoadLibraryPermanently(0); - } catch (...) { - assert(0 && "Exception in LoadLibraryPermantently.\n"); - } + dl_symbols.LoadLibraryPermanently(0); } #ifdef WINDOWS diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp index d86b9d48..dae6ffc5 100644 --- a/lib/Module/ModuleUtil.cpp +++ b/lib/Module/ModuleUtil.cpp @@ -31,20 +31,16 @@ using namespace klee; Module *klee::linkWithLibrary(Module *module, const std::string &libraryName) { - try { - Linker linker("klee", module, false); + Linker linker("klee", module, false); - llvm::sys::Path libraryPath(libraryName); - bool native = false; + llvm::sys::Path libraryPath(libraryName); + bool native = false; - if (linker.LinkInFile(libraryPath, native)) { - assert(0 && "linking in library failed!"); - } - - return linker.releaseModule(); - } catch (...) { - assert(0 && "error during linking"); + if (linker.LinkInFile(libraryPath, native)) { + assert(0 && "linking in library failed!"); } + + return linker.releaseModule(); } Function *klee::getDirectCallTarget(const Instruction *i) { -- cgit 1.4.1