Implement a -trace command line option and a trace option in the interpreter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@989 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index 29d45d6..798c500 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -14,12 +14,15 @@
 cl::String MainFunction ("f"      , "Function to execute", cl::NoFlags, "main");
 cl::Flag   DebugMode    ("debug"  , "Start program in debugger");
 cl::Alias  DebugModeA   ("d"      , "Alias for -debug", cl::NoFlags, DebugMode);
+cl::Flag   TraceMode    ("trace"  , "Enable Tracing");
 cl::Flag   ProfileMode  ("profile", "Enable Profiling [unimp]");
 
+
 //===----------------------------------------------------------------------===//
 // Interpreter ctor - Initialize stuff
 //
-Interpreter::Interpreter() : ExitCode(0), Profile(ProfileMode), CurFrame(-1) {
+Interpreter::Interpreter() : ExitCode(0), Profile(ProfileMode), 
+                             Trace(TraceMode), CurFrame(-1) {
   CurMod = 0;
   loadModule(InputArgv.size() ? InputArgv[0] : "");
 
@@ -46,6 +49,7 @@
 
   // If running with the profiler, enable it now...
   if (ProfileMode) I.enableProfiling();
+  if (TraceMode) I.enableTracing();
 
   // Start interpreter into the main function...
   //