aboutsummaryrefslogtreecommitdiff
path: root/tools/lli/lli.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-27 05:54:31 +0000
committerChris Lattner <sabre@nondot.org>2001-10-27 05:54:31 +0000
commit204eec3f57aedd703fb73db78ac2b4087caf9f07 (patch)
tree32ef1058acc01d8c9c2b21db31ab25e80c3a24d5 /tools/lli/lli.cpp
parentcaccd761a6320d9068a44198b9e1b6c3659f8bb5 (diff)
Provide argv for commands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli/lli.cpp')
-rw-r--r--tools/lli/lli.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index 818931c5f7..29d45d6830 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -10,7 +10,7 @@
#include "Interpreter.h"
#include "llvm/Support/CommandLine.h"
-cl::String InputFilename("" , "Input filename", cl::NoFlags, "-");
+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);
@@ -21,7 +21,7 @@ cl::Flag ProfileMode ("profile", "Enable Profiling [unimp]");
//
Interpreter::Interpreter() : ExitCode(0), Profile(ProfileMode), CurFrame(-1) {
CurMod = 0;
- loadModule(InputFilename);
+ loadModule(InputArgv.size() ? InputArgv[0] : "");
// Initialize the "backend"
initializeExecutionEngine();
@@ -49,7 +49,7 @@ int main(int argc, char** argv) {
// Start interpreter into the main function...
//
- if (!I.callMainMethod(MainFunction, InputFilename) && !DebugMode) {
+ if (!I.callMainMethod(MainFunction, InputArgv) && !DebugMode) {
// If not in debug mode and if the call succeeded, run the code now...
I.run();
}