projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de51dd8
)
Fix problem where lli < foo.bc would have argc = 0
author
Chris Lattner
<sabre@nondot.org>
Mon, 26 Nov 2001 19:20:38 +0000
(19:20 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 26 Nov 2001 19:20:38 +0000
(19:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1393
91177308
-0d34-0410-b5e6-
96231b3b80d8
tools/lli/lli.cpp
patch
|
blob
|
history
diff --git
a/tools/lli/lli.cpp
b/tools/lli/lli.cpp
index ba5a3a5dc725f43cf792939bdb0f271ea8d0b628..ef9dddf750df912963257e5f710e491ecd0ad56e 100644
(file)
--- 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) {