[llvm-commits] CVS: llvm/tools/lli/Interpreter/Interpreter.cpp Interpreter.h

Brian Gaeke gaeke at cs.uiuc.edu
Wed Sep 3 15:35:06 PDT 2003


Changes in directory llvm/tools/lli/Interpreter:

Interpreter.cpp updated: 1.8 -> 1.9
Interpreter.h updated: 1.33 -> 1.34

---
Log message:

ExecutionEngine.cpp: Move execution engine creation stuff into a new
  static method here.
 Remove some extra blank lines.
ExecutionEngine.h: Add its prototype.
lli.cpp: Call it.

Make creation method for each type of EE into a static method of its
own subclass.

Interpreter/Interpreter.cpp: ExecutionEngine::createInterpreter -->
 Interpreter::create
Interpreter/Interpreter.h: Likewise.
JIT/JIT.cpp: ExecutionEngine::createJIT --> VM::create
JIT/VM.h: Likewise.


---
Diffs of the changes:

Index: llvm/tools/lli/Interpreter/Interpreter.cpp
diff -u llvm/tools/lli/Interpreter/Interpreter.cpp:1.8 llvm/tools/lli/Interpreter/Interpreter.cpp:1.9
--- llvm/tools/lli/Interpreter/Interpreter.cpp:1.8	Sun Aug 24 14:50:52 2003
+++ llvm/tools/lli/Interpreter/Interpreter.cpp	Wed Sep  3 15:34:18 2003
@@ -9,11 +9,9 @@
 #include "Interpreter.h"
 #include "llvm/Module.h"
 
-/// createInterpreter - Create a new interpreter object.  This can never fail.
+/// create - Create a new interpreter object.  This can never fail.
 ///
-ExecutionEngine *ExecutionEngine::createInterpreter(Module *M,
-						    bool DebugMode,
-						    bool TraceMode) {
+ExecutionEngine *Interpreter::create(Module *M, bool DebugMode, bool TraceMode){
   bool isLittleEndian;
   switch (M->getEndianness()) {
   case Module::LittleEndian: isLittleEndian = true; break;


Index: llvm/tools/lli/Interpreter/Interpreter.h
diff -u llvm/tools/lli/Interpreter/Interpreter.h:1.33 llvm/tools/lli/Interpreter/Interpreter.h:1.34
--- llvm/tools/lli/Interpreter/Interpreter.h:1.33	Sun Aug 24 14:50:52 2003
+++ llvm/tools/lli/Interpreter/Interpreter.h	Wed Sep  3 15:34:18 2003
@@ -91,8 +91,13 @@
               bool DebugMode, bool TraceMode);
   inline ~Interpreter() { CW.setModule(0); }
 
-  // getExitCode - return the code that should be the exit code for the lli
-  // utility.
+  /// create - Create an interpreter ExecutionEngine. This can never fail.
+  ///
+  static ExecutionEngine *create(Module *M, bool DebugMode, bool TraceMode);
+
+  /// getExitCode - return the code that should be the exit code for the lli
+  /// utility.
+  ///
   inline int getExitCode() const { return ExitCode; }
 
   /// run - Start execution with the specified function and arguments.





More information about the llvm-commits mailing list