diff options
author | Martin Nowack <martin@se.inf.tu-dresden.de> | 2014-01-17 10:45:49 +0100 |
---|---|---|
committer | Martin Nowack <martin@se.inf.tu-dresden.de> | 2014-01-17 10:45:49 +0100 |
commit | 2f6dafae68e88f6a16f6df42e0b212767e95aebe (patch) | |
tree | 2fc5cea5c20d653e5b50981ca764849394d81e23 | |
parent | b64b96f721edc32bb806ef182f8097053585685d (diff) | |
download | klee-2f6dafae68e88f6a16f6df42e0b212767e95aebe.tar.gz |
Fix error message for failing linking of libraries
In case linking of external libraries failed, user would only be informed if KLEE is compiled with assertions enabled. This fix lets KLEE always fail.
-rw-r--r-- | lib/Module/ModuleUtil.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp index fcdfa35a..9ae72936 100644 --- a/lib/Module/ModuleUtil.cpp +++ b/lib/Module/ModuleUtil.cpp @@ -9,6 +9,8 @@ #include "klee/Internal/Support/ModuleUtil.h" #include "klee/Config/Version.h" +// FIXME: This does not belong here. +#include "../Core/Common.h" #if LLVM_VERSION_CODE >= LLVM_VERSION(3, 3) #include "llvm/Bitcode/ReaderWriter.h" @@ -55,7 +57,7 @@ module->getContext()); if (Linker::LinkModules(module, new_mod, Linker::DestroySource, &err_str)) { - assert(0 && "linked in library failed!"); + klee_error("Linking library %s failed", libraryName.c_str()); } return module; @@ -66,7 +68,7 @@ module->getContext()); bool native = false; if (linker.LinkInFile(libraryPath, native)) { - assert(0 && "linking in library failed!"); + klee_error("Linking library %s failed", libraryName.c_str()); } return linker.releaseModule(); |