diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 6eb0324dd87..e04f5642d06 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -637,9 +637,9 @@ void Interpreter::visitStoreInst(StoreInst &I) { // Miscellaneous Instruction Implementations //===----------------------------------------------------------------------===// -void Interpreter::visitCallInst(CallInst &I) { +void Interpreter::visitCallSite(CallSite CS) { ExecutionContext &SF = ECStack.back(); - SF.Caller = CallSite(&I); + SF.Caller = CS; std::vector ArgVals; const unsigned NumArgs = SF.Caller.arg_size(); ArgVals.reserve(NumArgs); diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h index 06e82572c19..974aea89647 100644 --- a/lib/ExecutionEngine/Interpreter/Interpreter.h +++ b/lib/ExecutionEngine/Interpreter/Interpreter.h @@ -119,10 +119,13 @@ public: void visitLoadInst(LoadInst &I); void visitStoreInst(StoreInst &I); void visitGetElementPtrInst(GetElementPtrInst &I); - void visitPHINode(PHINode &PN) { assert(0 && "PHI nodes already handled!"); } void visitCastInst(CastInst &I); - void visitCallInst(CallInst &I); + + void visitCallSite(CallSite CS); + void visitCallInst(CallInst &I) { visitCallSite (CallSite (&I)); } + void visitInvokeInst(InvokeInst &I) { visitCallSite (CallSite (&I)); } + void visitShl(ShiftInst &I); void visitShr(ShiftInst &I); void visitVANextInst(VANextInst &I);