Implement a -trace command line option and a trace option in the interpreter.
llvm-svn: 989
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
index a7ded5b..1d7ec7a 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -834,6 +834,9 @@
ExecutionContext &SF = ECStack.back(); // Current stack frame
Instruction *I = *SF.CurInst++; // Increment before execute
+ if (Trace)
+ cout << "Run:" << I;
+
if (I->isBinaryOp()) {
executeBinaryInst((BinaryOperator*)I, SF);
} else {