From 2fdd5aa8fc01e3d5c1ff66adf03b6dbb8e427ecd Mon Sep 17 00:00:00 2001 From: Andrea Mattavelli Date: Thu, 4 Aug 2016 17:00:01 +0100 Subject: Modified logging information to steer the usage of klee_message, klee_warning, and klee_error --- lib/Core/Executor.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lib/Core/Executor.cpp') 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; } -- cgit 1.4.1