summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-06-26 16:46:15 +0000
committerOwen Anderson <resistor@mac.com>2009-06-26 16:46:15 +0000
commitfdca74c5671e01447be0f1bac3c0c7aa1727690b (patch)
tree99d4e85fd91ca4ba05782719fc058816b9e15d97 /lib
parentcaffbd7b01c232c4d70ae13f6464fbaf08768783 (diff)
downloadllvm-fdca74c5671e01447be0f1bac3c0c7aa1727690b.tar.gz
llvm-fdca74c5671e01447be0f1bac3c0c7aa1727690b.tar.bz2
llvm-fdca74c5671e01447be0f1bac3c0c7aa1727690b.tar.xz
Get rid of unnecessary global variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/ExecutionEngine/Interpreter/Execution.cpp7
-rw-r--r--lib/ExecutionEngine/Interpreter/Interpreter.h2
2 files changed, 2 insertions, 7 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index 7dfeae0ab2..bb3f64e626 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -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);
}
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h
index 8a285ecb82..6b13c90f66 100644
--- a/lib/ExecutionEngine/Interpreter/Interpreter.h
+++ b/lib/ExecutionEngine/Interpreter/Interpreter.h
@@ -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);