From 9b8bc833e90176059e920ce61a156ba7dba967d6 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 24 Sep 2008 16:25:55 +0000 Subject: Add DisableGVCompilation which forces the JIT to assert when it tries to allocate space for a GlobalVariable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56557 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ExecutionEngine/ExecutionEngine.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/llvm/ExecutionEngine/ExecutionEngine.h') diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index edcddde..d4fd0fb 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -65,6 +65,7 @@ class ExecutionEngine { const TargetData *TD; ExecutionEngineState state; bool LazyCompilationDisabled; + bool GVCompilationDisabled; bool SymbolSearchingDisabled; protected: @@ -254,6 +255,16 @@ public: bool isLazyCompilationDisabled() const { return LazyCompilationDisabled; } + + /// DisableGVCompilation - If called, the JIT will abort if it's asked to allocate + /// space and populate a GlobalVariable. + 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. -- cgit v1.1