aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/Interpreter/Interpreter.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-10 20:21:16 +0000
committerChris Lattner <sabre@nondot.org>2003-05-10 20:21:16 +0000
commit77113b627237fe2850676cccd809de1e05f03952 (patch)
treeeaf11239f56cc664f6f9ff15f707e45df66ef3cb /lib/ExecutionEngine/Interpreter/Interpreter.h
parentb450b20bcf0052956c88d541be5080212b95c0f9 (diff)
Fix testcase: SingleSource/UnitTests/2003-05-02-DependantPHI.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/Interpreter.h')
-rw-r--r--lib/ExecutionEngine/Interpreter/Interpreter.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h
index 0b01f8df58..4d8c44ad76 100644
--- a/lib/ExecutionEngine/Interpreter/Interpreter.h
+++ b/lib/ExecutionEngine/Interpreter/Interpreter.h
@@ -23,6 +23,7 @@ struct FunctionInfo; // Defined in ExecutionAnnotations.h
class CallInst;
class ReturnInst;
class BranchInst;
+class SwitchInst;
class LoadInst;
class StoreInst;
class AllocationInst;
@@ -70,7 +71,6 @@ struct ExecutionContext {
std::vector<ValuePlaneTy> Values;// ValuePlanes for each type
std::vector<GenericValue> VarArgs; // Values passed through an ellipsis
- BasicBlock *PrevBB; // The previous BB or null if in first BB
CallInst *Caller; // Holds the call that called subframes.
// NULL if main func or debugger invoked fn
AllocaHolderHandle Allocas; // Track memory allocated by alloca
@@ -137,6 +137,7 @@ public:
void executeCallInst(CallInst &I, ExecutionContext &SF);
void executeRetInst(ReturnInst &I, ExecutionContext &SF);
void executeBrInst(BranchInst &I, ExecutionContext &SF);
+ void executeSwitchInst(SwitchInst &I, ExecutionContext &SF);
void executeAllocInst(AllocationInst &I, ExecutionContext &SF);
GenericValue callExternalFunction(Function *F,
const std::vector<GenericValue> &ArgVals);
@@ -161,6 +162,12 @@ public:
private: // Helper functions
+ // SwitchToNewBasicBlock - Start execution in a new basic block and run any
+ // PHI nodes in the top of the block. This is used for intraprocedural
+ // control flow.
+ //
+ void SwitchToNewBasicBlock(BasicBlock *Dest, ExecutionContext &SF);
+
void *getPointerToFunction(const Function *F) { return (void*)F; }
// getCurrentExecutablePath() - Return the directory that the lli executable