summaryrefslogtreecommitdiff
path: root/include/llvm/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-06-16 17:44:14 +0000
committerChris Lattner <sabre@nondot.org>2008-06-16 17:44:14 +0000
commite846db667529eeeae531ce3b7382e18888d1eba0 (patch)
tree3e03346b350a1b7cda9e608e7b4e40b9eda564f3 /include/llvm/ExecutionEngine
parent16228c08b4cbad0620fe09b8afb3da70e3fbb040 (diff)
downloadllvm-e846db667529eeeae531ce3b7382e18888d1eba0.tar.gz
llvm-e846db667529eeeae531ce3b7382e18888d1eba0.tar.bz2
llvm-e846db667529eeeae531ce3b7382e18888d1eba0.tar.xz
Add a new flag that disables symbol lookup with dlsym when set. This allows
a JIT client to completely control symbol lookup with the LazyFunctionCreator interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ExecutionEngine')
-rw-r--r--include/llvm/ExecutionEngine/ExecutionEngine.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h
index 1159971a45..6fd368d207 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 SymbolSearchingDisabled;
protected:
/// Modules - This is a list of ModuleProvider's that we are JIT'ing from. We
@@ -243,13 +244,22 @@ public:
}
/// DisableLazyCompilation - If called, the JIT will abort if lazy compilation
- // is ever attempted.
- void DisableLazyCompilation() {
- LazyCompilationDisabled = true;
+ /// is ever attempted.
+ void DisableLazyCompilation(bool Disabled = true) {
+ LazyCompilationDisabled = Disabled;
}
bool isLazyCompilationDisabled() const {
return LazyCompilationDisabled;
}
+ /// 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.
+ void DisableSymbolSearching(bool Disabled = true) {
+ SymbolSearchingDisabled = Disabled;
+ }
+ bool isSymbolSearchingDisabled() const {
+ return SymbolSearchingDisabled;
+ }
/// InstallLazyFunctionCreator - If an unknown function is needed, the