diff options
author | Chris Lattner <sabre@nondot.org> | 2001-11-26 19:20:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-11-26 19:20:38 +0000 |
commit | aca8e90cd9f632ffcedbf0ce97bf4c22c955a3d8 (patch) | |
tree | 7921db30a1a7538aa32fef78c6577b893553cdd4 /tools | |
parent | de51dd890fb7b0c7175f3f09dbe3220f7dbaa0fe (diff) | |
download | external_llvm-aca8e90cd9f632ffcedbf0ce97bf4c22c955a3d8.zip external_llvm-aca8e90cd9f632ffcedbf0ce97bf4c22c955a3d8.tar.gz external_llvm-aca8e90cd9f632ffcedbf0ce97bf4c22c955a3d8.tar.bz2 |
Fix problem where lli < foo.bc would have argc = 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lli/lli.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index ba5a3a5..ef9dddf 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -52,6 +52,13 @@ int main(int argc, char** argv) { if (ProfileMode) I.enableProfiling(); if (TraceMode) I.enableTracing(); + // Ensure that there is at least one argument... the name of the program. + // This is only unavailable if the program was read from stdin, instead of a + // file. + // + if (InputArgv.empty()) + InputArgv.push_back("from-stdin-prog"); + // Start interpreter into the main function... // if (!I.callMainMethod(MainFunction, InputArgv) && !DebugMode) { |