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
This commit is contained in:
Chris Lattner
2001-10-27 08:43:52 +00:00
parent c259316730
commit 43e3f7c962
4 changed files with 25 additions and 2 deletions
+5 -1
View File
@@ -14,12 +14,15 @@ cl::StringList InputArgv("" , "Input command line", cl::ConsumeAfter);
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 @@ int main(int argc, char** argv) {
// If running with the profiler, enable it now...
if (ProfileMode) I.enableProfiling();
if (TraceMode) I.enableTracing();
// Start interpreter into the main function...
//