diff options
Diffstat (limited to 'lib/Core')
-rw-r--r-- | lib/Core/Executor.cpp | 12 | ||||
-rw-r--r-- | lib/Core/Searcher.cpp | 6 |
2 files changed, 8 insertions, 10 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 8b885527..1df51b4d 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -356,8 +356,7 @@ Executor::Executor(const InterpreterOptions &opts, InterpreterHandler *ih) if (coreSolverTimeout) UseForkedCoreSolver = true; Solver *coreSolver = klee::createCoreSolver(CoreSolverToUse); if (!coreSolver) { - llvm::errs() << "Failed to create core solver\n"; - exit(1); + klee_error("Failed to create core solver\n"); } Solver *solver = constructSolverChain( coreSolver, @@ -1481,9 +1480,8 @@ Function* Executor::getTargetFunction(Value *calledVal, ExecutionState &state) { GlobalValue *old_gv = gv; gv = currModule->getNamedValue(alias); if (!gv) { - llvm::errs() << "Function " << alias << "(), alias for " - << old_gv->getName() << " not found!\n"; - assert(0 && "function alias not found"); + klee_error("Function %s(), alias for %s not found!\n", alias.c_str(), + old_gv->getName().str().c_str()); } } @@ -3018,8 +3016,8 @@ void Executor::callExternalFunction(ExecutionState &state, return; if (NoExternals && !okExternals.count(function->getName())) { - llvm::errs() << "KLEE:ERROR: Calling not-OK external function : " - << function->getName().str() << "\n"; + klee_warning("Calling not-OK external function : %s\n", + function->getName().str().c_str()); terminateStateOnError(state, "externals disallowed", User); return; } diff --git a/lib/Core/Searcher.cpp b/lib/Core/Searcher.cpp index 973057c3..3bfcd6b3 100644 --- a/lib/Core/Searcher.cpp +++ b/lib/Core/Searcher.cpp @@ -527,8 +527,8 @@ ExecutionState &BatchingSearcher::selectState() { if (lastState) { double delta = util::getWallTime()-lastStartTime; if (delta>timeBudget*1.1) { - llvm::errs() << "KLEE: increased time budget from " << timeBudget - << " to " << delta << "\n"; + klee_message("KLEE: increased time budget from %f to %f\n", timeBudget, + delta); timeBudget = delta; } } @@ -601,7 +601,7 @@ void IterativeDeepeningTimeSearcher::update( if (baseSearcher->empty()) { time *= 2; - llvm::errs() << "KLEE: increasing time budget to: " << time << "\n"; + klee_message("KLEE: increased time budget to %f\n", time); std::vector<ExecutionState *> ps(pausedStates.begin(), pausedStates.end()); baseSearcher->update(0, ps, std::vector<ExecutionState *>()); pausedStates.clear(); |