summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-09-05 18:55:03 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-09-05 18:55:03 +0000
commit29794cba810ec249a9ede5ea77333a71579fd182 (patch)
tree474fc2f6d9b723e9bddab56b1eaec8a368d65ec5 /lib/ExecutionEngine
parent70975eef572b9e132bbaade16ba9edb76f15f287 (diff)
downloadllvm-29794cba810ec249a9ede5ea77333a71579fd182.tar.gz
llvm-29794cba810ec249a9ede5ea77333a71579fd182.tar.bz2
llvm-29794cba810ec249a9ede5ea77333a71579fd182.tar.xz
Make getOperandValue and executeCastOperation methods of Interpreter.
This lets us protect a few more ExecutionEngine methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/Interpreter/Execution.cpp6
-rw-r--r--lib/ExecutionEngine/Interpreter/Interpreter.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index 80a0677a37..4570f1a239 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -77,7 +77,7 @@ static GenericValue executeAddInst(GenericValue Src1, GenericValue Src2,
const Type *Ty);
-static GenericValue getOperandValue(Value *V, ExecutionContext &SF) {
+GenericValue Interpreter::getOperandValue(Value *V, ExecutionContext &SF) {
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
switch (CE->getOpcode()) {
case Instruction::Cast:
@@ -840,8 +840,8 @@ void Interpreter::visitShr(ShiftInst &I) {
IMPLEMENT_CAST_CASE_FP_IMP(DESTTY, DESTCTY); \
IMPLEMENT_CAST_CASE_END()
-static GenericValue executeCastOperation(Value *SrcVal, const Type *Ty,
- ExecutionContext &SF) {
+GenericValue Interpreter::executeCastOperation(Value *SrcVal, const Type *Ty,
+ ExecutionContext &SF) {
const Type *SrcTy = SrcVal->getType();
GenericValue Dest, Src = getOperandValue(SrcVal, SF);
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h
index ef0540c1fe..a59ebade36 100644
--- a/lib/ExecutionEngine/Interpreter/Interpreter.h
+++ b/lib/ExecutionEngine/Interpreter/Interpreter.h
@@ -159,6 +159,9 @@ private: // Helper functions
void initializeExecutionEngine();
void initializeExternalFunctions();
+ GenericValue getOperandValue(Value *V, ExecutionContext &SF);
+ GenericValue executeCastOperation(Value *SrcVal, const Type *Ty,
+ ExecutionContext &SF);
};
#endif