const TargetData *TD;
ExecutionEngineState state;
bool LazyCompilationDisabled;
+ bool GVCompilationDisabled;
bool SymbolSearchingDisabled;
protected:
void setTargetData(const TargetData *td) {
TD = td;
}
+
+ /// getMemoryforGV - Allocate memory for a global variable.
+ virtual char* getMemoryForGV(const GlobalVariable* GV);
// To avoid having libexecutionengine depend on the JIT and interpreter
// libraries, the JIT and Interpreter set these functions to ctor pointers
const std::vector<GenericValue> &ArgValues) = 0;
/// runStaticConstructorsDestructors - This method is used to execute all of
- /// the static constructors or destructors for a module, depending on the
+ /// the static constructors or destructors for a program, depending on the
/// value of isDtors.
void runStaticConstructorsDestructors(bool isDtors);
+ /// runStaticConstructorsDestructors - This method is used to execute all of
+ /// the static constructors or destructors for a module, depending on the
+ /// value of isDtors.
+ void runStaticConstructorsDestructors(Module *module, bool isDtors);
/// runFunctionAsMain - This is a helper function which wraps runFunction to
bool isLazyCompilationDisabled() const {
return LazyCompilationDisabled;
}
+
+ /// DisableGVCompilation - If called, the JIT will abort if it's asked to
+ /// allocate space and populate a GlobalVariable that is not internal to
+ /// the module.
+ void DisableGVCompilation(bool Disabled = true) {
+ GVCompilationDisabled = Disabled;
+ }
+ bool isGVCompilationDisabled() const {
+ return GVCompilationDisabled;
+ }
+
/// DisableSymbolSearching - If called, the JIT will not try to lookup unknown
/// symbols with dlsym. A client can still use InstallLazyFunctionCreator to
/// resolve symbols in a custom way.