about summary refs log tree commit diff homepage
path: root/lib/Core
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2017-03-02 14:59:28 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2017-03-03 17:30:16 +0000
commit6f20f660ab2ae28ba6ec8e5262a2d1c31e0ab9ed (patch)
treec7677c524bbc25255c49a2c32477626af8cf4de6 /lib/Core
parent4f5ea494986689dd89f97f9a64082527557c71c9 (diff)
downloadklee-6f20f660ab2ae28ba6ec8e5262a2d1c31e0ab9ed.tar.gz
Moved printFileLine() to be part of KInstruction
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/Executor.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index c5d294fb..48a4a32f 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -1235,8 +1235,11 @@ void Executor::printDebugInstructions(ExecutionState &state) {
     stream = &debugLogBuffer;
 
   if (!optionIsSet(DebugPrintInstructions, STDERR_COMPACT) &&
-      !optionIsSet(DebugPrintInstructions, FILE_COMPACT))
-    printFileLine(state, state.pc, *stream);
+      !optionIsSet(DebugPrintInstructions, FILE_COMPACT)) {
+    (*stream) << "     ";
+    state.pc->printFileLine(*stream);
+    (*stream) << ":";
+  }
 
   (*stream) << state.pc->info->id;
 
@@ -1461,15 +1464,6 @@ void Executor::transferToBasicBlock(BasicBlock *dst, BasicBlock *src,
   }
 }
 
-void Executor::printFileLine(ExecutionState &state, KInstruction *ki,
-                             llvm::raw_ostream &debugFile) {
-  const InstructionInfo &ii = *ki->info;
-  if (ii.file != "")
-    debugFile << "     " << ii.file << ":" << ii.line << ":";
-  else
-    debugFile << "     [no debug info]:";
-}
-
 /// Compute the true target of a function call, resolving LLVM and KLEE aliases
 /// and bitcasts.
 Function* Executor::getTargetFunction(Value *calledVal, ExecutionState &state) {