about summary refs log tree commit diff homepage
path: root/lib/Module/KModule.cpp
diff options
context:
space:
mode:
authorDan Liew <delcypher@gmail.com>2014-01-17 05:30:10 -0800
committerDan Liew <delcypher@gmail.com>2014-01-17 05:30:10 -0800
commitf626bdb1905c4d56fdcca04cd6ee84acb7597431 (patch)
tree2fc5cea5c20d653e5b50981ca764849394d81e23 /lib/Module/KModule.cpp
parent8c03dfa5ea9fe5176cbb82b70a36ffa93c70b91c (diff)
parent2f6dafae68e88f6a16f6df42e0b212767e95aebe (diff)
downloadklee-f626bdb1905c4d56fdcca04cd6ee84acb7597431.tar.gz
Merge pull request #94 from MartinNowack/fix_assert_library_linking
Fix assert library linking
Diffstat (limited to 'lib/Module/KModule.cpp')
-rw-r--r--lib/Module/KModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp
index 34e5f60c..2ecb14b8 100644
--- a/lib/Module/KModule.cpp
+++ b/lib/Module/KModule.cpp
@@ -182,7 +182,8 @@ static void injectStaticConstructorsAndDestructors(Module *m) {
   
   if (ctors || dtors) {
     Function *mainFn = m->getFunction("main");
-    assert(mainFn && "unable to find main function");
+    if (!mainFn)
+      klee_error("Could not find main() function.");
 
     if (ctors)
     CallInst::Create(getStubFunctionForCtorList(m, ctors, "klee.ctor_stub"),