Get rid of unnecessary global variables.
authorOwen Anderson <resistor@mac.com>
Fri, 26 Jun 2009 16:46:15 +0000 (16:46 +0000)
committerOwen Anderson <resistor@mac.com>
Fri, 26 Jun 2009 16:46:15 +0000 (16:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74291 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/Interpreter/Execution.cpp
lib/ExecutionEngine/Interpreter/Interpreter.h

index 7dfeae0ab2eb057fc14f02f333afcf72c19d93b9..bb3f64e626f05943ff80a858138e023cd8cfaa25 100644 (file)
@@ -29,7 +29,6 @@
 using namespace llvm;
 
 STATISTIC(NumDynamicInsts, "Number of dynamic instructions executed");
-static Interpreter *TheEE = 0;
 
 static cl::opt<bool> PrintVolatile("interpreter-print-volatile", cl::Hidden,
           cl::desc("make the interpreter print every volatile load and store"));
@@ -51,10 +50,6 @@ static void SetValue(Value *V, GenericValue Val, ExecutionContext &SF) {
   SF.Values[V] = Val;
 }
 
-void Interpreter::initializeExecutionEngine() {
-  TheEE = this;
-}
-
 //===----------------------------------------------------------------------===//
 //                    Binary Instruction Implementations
 //===----------------------------------------------------------------------===//
@@ -815,7 +810,7 @@ GenericValue Interpreter::executeGEPOperation(Value *Ptr, gep_type_iterator I,
 
 void Interpreter::visitGetElementPtrInst(GetElementPtrInst &I) {
   ExecutionContext &SF = ECStack.back();
-  SetValue(&I, TheEE->executeGEPOperation(I.getPointerOperand(),
+  SetValue(&I, executeGEPOperation(I.getPointerOperand(),
                                    gep_type_begin(I), gep_type_end(I), SF), SF);
 }
 
index 8a285ecb82c00099a02fe609bb6b8c6da61de1ae..6b13c90f6671ae50e45788b88d51baac85a42c0a 100644 (file)
@@ -202,7 +202,7 @@ private:  // Helper functions
 
   void *getPointerToFunction(Function *F) { return (void*)F; }
 
-  void initializeExecutionEngine();
+  void initializeExecutionEngine() { }
   void initializeExternalFunctions();
   GenericValue getConstantExprValue(ConstantExpr *CE, ExecutionContext &SF);
   GenericValue getOperandValue(Value *V, ExecutionContext &SF);