From 765c93cefda367d8e5a8e0afcd610a7e15bbd987 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 22 Mar 2006 06:06:37 +0000 Subject: [PATCH] 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 --- .../llvm/ExecutionEngine/ExecutionEngine.h | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index 6b248e54c8e..e3c1219d298 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -48,11 +48,13 @@ private: std::map GlobalAddressReverseMap; public: - std::map& getGlobalAddressMap(const MutexGuard& locked) { + std::map & + getGlobalAddressMap(const MutexGuard &locked) { return GlobalAddressMap; } - std::map& getGlobalAddressReverseMap(const MutexGuard& locked) { + std::map & + 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::iterator I = state.getGlobalAddressMap(locked).find(GV); + std::map::iterator I = + state.getGlobalAddressMap(locked).find(GV); return I != state.getGlobalAddressMap(locked).end() ? I->second : 0; }