[llvm-commits] CVS: llvm/tools/lli/ExecutionEngine.h lli.cpp
John Criswell
criswell at cs.uiuc.edu
Thu Aug 21 16:13:02 PDT 2003
Changes in directory llvm/tools/lli:
ExecutionEngine.h updated: 1.6 -> 1.7
lli.cpp updated: 1.18 -> 1.19
---
Log message:
The JIT now passes the environment pointer to the main() function when it
starts a program. This allows the GNU env program to compile and JIT under
LLVM.
---
Diffs of the changes:
Index: llvm/tools/lli/ExecutionEngine.h
diff -u llvm/tools/lli/ExecutionEngine.h:1.6 llvm/tools/lli/ExecutionEngine.h:1.7
--- llvm/tools/lli/ExecutionEngine.h:1.6 Wed Aug 13 13:17:51 2003
+++ llvm/tools/lli/ExecutionEngine.h Thu Aug 21 16:12:26 2003
@@ -41,10 +41,12 @@
Module &getModule() const { return CurMod; }
const TargetData &getTargetData() const { return *TD; }
- /// run - Start execution with the specified function and arguments.
+ /// run - Start execution with the specified function, arguments, and
+ /// environment.
///
virtual int run(const std::string &FnName,
- const std::vector<std::string> &Args) = 0;
+ const std::vector<std::string> &Args,
+ const char ** envp) = 0;
/// createJIT - Create an return a new JIT compiler if there is one available
/// for the current target. Otherwise it returns null.
Index: llvm/tools/lli/lli.cpp
diff -u llvm/tools/lli/lli.cpp:1.18 llvm/tools/lli/lli.cpp:1.19
--- llvm/tools/lli/lli.cpp:1.18 Fri May 23 15:28:07 2003
+++ llvm/tools/lli/lli.cpp Thu Aug 21 16:12:26 2003
@@ -46,7 +46,7 @@
//===----------------------------------------------------------------------===//
// main Driver function
//
-int main(int argc, char** argv) {
+int main(int argc, char** argv, const char ** envp) {
cl::ParseCommandLineOptions(argc, argv,
" llvm interpreter & dynamic compiler\n");
@@ -98,7 +98,7 @@
InputArgv.insert(InputArgv.begin(), InputFile);
// Run the main function!
- int ExitCode = EE->run(MainFunction, InputArgv);
+ int ExitCode = EE->run(MainFunction, InputArgv, envp);
// Now that we are done executing the program, shut down the execution engine
delete EE;
More information about the llvm-commits
mailing list