namespace llvm {
class IntrinsicLowering;
-struct FunctionInfo;
template<typename T> class generic_gep_type_iterator;
class ConstantExpr;
typedef generic_gep_type_iterator<User::const_op_iterator> gep_type_iterator;
Values = std::move(O.Values);
VarArgs = std::move(O.VarArgs);
Allocas = std::move(O.Allocas);
+ return *this;
}
};
//
class Interpreter : public ExecutionEngine, public InstVisitor<Interpreter> {
GenericValue ExitValue; // The return value of the called function
- DataLayout TD;
IntrinsicLowering *IL;
// The runtime stack of executing code. The top of the stack is the current
public:
explicit Interpreter(std::unique_ptr<Module> M);
- ~Interpreter();
+ ~Interpreter() override;
/// runAtExitHandlers - Run any functions registered by the program's calls to
/// atexit(3), which we intercept and store in AtExitHandlers.
/// run - Start execution with the specified function and arguments.
///
GenericValue runFunction(Function *F,
- const std::vector<GenericValue> &ArgValues) override;
+ ArrayRef<GenericValue> ArgValues) override;
void *getPointerToNamedFunction(StringRef Name,
bool AbortOnFailure = true) override {
// Methods used to execute code:
// Place a call on the stack
- void callFunction(Function *F, const std::vector<GenericValue> &ArgVals);
+ void callFunction(Function *F, ArrayRef<GenericValue> ArgVals);
void run(); // Execute instructions until nothing left to do
// Opcode Implementations
}
GenericValue callExternalFunction(Function *F,
- const std::vector<GenericValue> &ArgVals);
+ ArrayRef<GenericValue> ArgVals);
void exitCalled(GenericValue GV);
void addAtExitHandler(Function *F) {