diff options
author | Chris Lattner <sabre@nondot.org> | 2006-03-22 06:06:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-03-22 06:06:37 +0000 |
commit | 765c93cefda367d8e5a8e0afcd610a7e15bbd987 (patch) | |
tree | ad2226e3754219ee44c3f8a196c3552131a8405b /include | |
parent | 9d86a9dff23fa56b7de60fa79baf9351cf921f99 (diff) | |
download | external_llvm-765c93cefda367d8e5a8e0afcd610a7e15bbd987.zip external_llvm-765c93cefda367d8e5a8e0afcd610a7e15bbd987.tar.gz external_llvm-765c93cefda367d8e5a8e0afcd610a7e15bbd987.tar.bz2 |
wrap lines to 80 columns.
Add static JITCtor/InterpCtor fields
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ExecutionEngine/ExecutionEngine.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index 6b248e5..e3c1219 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -48,11 +48,13 @@ private: std::map<void *, const GlobalValue*> GlobalAddressReverseMap; public: - std::map<const GlobalValue*, void *>& getGlobalAddressMap(const MutexGuard& locked) { + std::map<const GlobalValue*, void *> & + getGlobalAddressMap(const MutexGuard &locked) { return GlobalAddressMap; } - std::map<void *, const GlobalValue*>& getGlobalAddressReverseMap(const MutexGuard& locked) { + std::map<void*, const GlobalValue*> & + getGlobalAddressReverseMap(const MutexGuard& locked) { return GlobalAddressReverseMap; } }; @@ -71,9 +73,16 @@ protected: TD = &td; } + // To avoid having libexecutionengine depend on the JIT and interpreter + // libraries, the JIT and Interpreter set these functions to ctor pointers + // at startup time if they are linked in. + typedef ExecutionEngine *(*EECtorFn)(ModuleProvider*, IntrinsicLowering*); + static EECtorFn JITCtor, InterpCtor; + public: - /// lock - This lock is protects the ExecutionEngine, JIT, JITResolver and JITEmitter classes. - /// It must be held while changing the internal state of any of those classes. + /// lock - This lock is protects the ExecutionEngine, JIT, JITResolver and + /// JITEmitter classes. It must be held while changing the internal state of + /// any of those classes. sys::Mutex lock; // Used to make this class and subclasses thread-safe ExecutionEngine(ModuleProvider *P); @@ -156,7 +165,8 @@ public: void *getPointerToGlobalIfAvailable(const GlobalValue *GV) { MutexGuard locked(lock); - std::map<const GlobalValue*, void*>::iterator I = state.getGlobalAddressMap(locked).find(GV); + std::map<const GlobalValue*, void*>::iterator I = + state.getGlobalAddressMap(locked).find(GV); return I != state.getGlobalAddressMap(locked).end() ? I->second : 0; } |