diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-16 17:44:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-16 17:44:14 +0000 |
commit | 247ec52c603de0c0e0cb6f6545a0bb01c70514e9 (patch) | |
tree | 3e03346b350a1b7cda9e608e7b4e40b9eda564f3 /include/llvm/ExecutionEngine | |
parent | dab43b2fc2955afd32ef386e3611355e5170b411 (diff) | |
download | external_llvm-247ec52c603de0c0e0cb6f6545a0bb01c70514e9.zip external_llvm-247ec52c603de0c0e0cb6f6545a0bb01c70514e9.tar.gz external_llvm-247ec52c603de0c0e0cb6f6545a0bb01c70514e9.tar.bz2 |
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.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index 1159971..6fd368d 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 |