[llvm-commits] [bug_122] CVS: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp

LLVM llvm at cs.uiuc.edu
Sun May 16 21:27:02 PDT 2004


Changes in directory llvm/lib/ExecutionEngine/Interpreter:

ExternalFunctions.cpp updated: 1.73.2.1 -> 1.73.2.2

---
Log message:

Remove the getFILE function who's body became null and replace with a
macro that performs the type conversion necessary.

*NOTE* This change can be merged from bug_122 branch to mainline.


---
Diffs of the changes:  (+2 -12)

Index: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
diff -u llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.73.2.1 llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.73.2.2
--- llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.73.2.1	Wed May 12 11:33:43 2004
+++ llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp	Sun May 16 21:27:31 2004
@@ -22,7 +22,6 @@
 #include "Interpreter.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Module.h"
-#include "llvm/SymbolTable.h"
 #include "llvm/Target/TargetData.h"
 #include "Support/DynamicLinker.h"
 #include "Config/dlfcn.h"
@@ -541,17 +540,8 @@
 //===----------------------------------------------------------------------===//
 
 // getFILE - Turn a pointer in the host address space into a legit pointer in
-// the interpreter address space.  For the most part, this is an identity
-// transformation, but if the program refers to stdio, stderr, stdin then they
-// have pointers that are relative to the __iob array.  If this is the case,
-// change the FILE into the REAL stdio stream.
-// 
-static FILE *getFILE(void *Ptr) {
-    // Content of this function was excised because it had no effect.
-    // Probably need to avoid its use .
-  return (FILE*)Ptr;
-}
-
+// the interpreter address space.  This is an identity transformation.
+#define getFILE(ptr) ((FILE*)ptr)
 
 // FILE *fopen(const char *filename, const char *mode);
 GenericValue lle_X_fopen(FunctionType *M, const vector<GenericValue> &Args) {





More information about the llvm-commits mailing list