From fe11a97fcde7c63109c3ad36570657807d0cd6ef Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 23 Dec 2002 23:59:41 +0000 Subject: Substantial changes to refactor LLI to incorporate both the Jello JIT and the traditional LLI interpreter git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5125 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp') diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 79e730f0ec..0d8cae2fea 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -12,6 +12,7 @@ #include "Interpreter.h" #include "ExecutionAnnotations.h" +#include "llvm/Module.h" #include "llvm/DerivedTypes.h" #include "llvm/SymbolTable.h" #include "llvm/Target/TargetData.h" @@ -23,8 +24,6 @@ using std::vector; using std::cout; -extern TargetData TD; - typedef GenericValue (*ExFunc)(FunctionType *, const vector &); static std::map Functions; static std::map FuncNames; @@ -440,8 +439,8 @@ static FILE *getFILE(PointerTy Ptr) { static PointerTy IOBBase = 0; static unsigned FILESize; - if (LastMod != TheInterpreter->getModule()) { // Module change or initialize? - Module *M = LastMod = TheInterpreter->getModule(); + if (LastMod != &TheInterpreter->getModule()) { // Module change or initialize? + Module *M = LastMod = &TheInterpreter->getModule(); // Check to see if the currently loaded module contains an __iob symbol... GlobalVariable *IOB = 0; @@ -456,6 +455,7 @@ static FILE *getFILE(PointerTy Ptr) { if (IOB) break; } +#if 0 /// FIXME! __iob support for LLI // If we found an __iob symbol now, find out what the actual address it's // held in is... if (IOB) { @@ -472,6 +472,7 @@ static FILE *getFILE(PointerTy Ptr) { else FILESize = 16*8; // Default size } +#endif } // Check to see if this is a reference to __iob... -- cgit v1.2.3-18-g5258