because the globals may refer to functions that need to be compiled!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6105
91177308-0d34-0410-b5e6-
96231b3b80d8
void setTargetData(const TargetData &td) {
TD = &td;
- emitGlobals();
}
public:
ExecutionEngine(Module *M) : CurMod(*M) {
//
virtual void *getPointerToFunction(const Function *F) = 0;
-private:
+protected:
void emitGlobals();
public: // FIXME: protected: // API shared among subclasses
initializeExecutionEngine();
initializeExternalFunctions();
CW.setModule(M); // Update Writer
+ emitGlobals();
}
/// run - Start execution with the specified function and arguments.
MCE = createEmitter(*this); // Initialize MCE
setupPassManager();
registerCallback();
+ emitGlobals();
}
int VM::run(const std::string &FnName, const std::vector<std::string> &Args) {