diff options
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld')
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h | 1 | ||||
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h | 1 | ||||
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h b/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h index 69e9dbe490..6a514ea3ec 100644 --- a/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h +++ b/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h @@ -16,6 +16,7 @@ namespace llvm { /// Global access point for the JIT debugging interface. class JITRegistrar { + virtual void anchor(); public: /// Instantiates the JIT service. JITRegistrar() {} diff --git a/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h b/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h index 89350cc5b6..9cbde5daed 100644 --- a/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h +++ b/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h @@ -23,6 +23,7 @@ namespace llvm { class ObjectImageCommon : public ObjectImage { ObjectImageCommon(); // = delete ObjectImageCommon(const ObjectImageCommon &other); // = delete + virtual void anchor(); protected: object::ObjectFile *ObjFile; diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index 2c068be970..9641a57756 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -13,6 +13,7 @@ #define DEBUG_TYPE "dyld" #include "llvm/ExecutionEngine/RuntimeDyld.h" +#include "JITRegistrar.h" #include "ObjectImageCommon.h" #include "RuntimeDyldELF.h" #include "RuntimeDyldImpl.h" @@ -28,6 +29,11 @@ using namespace llvm::object; // Empty out-of-line virtual destructor as the key function. RuntimeDyldImpl::~RuntimeDyldImpl() {} +// pin JITRegistrar.h and ObjectImage*.h vtables to this file +void JITRegistrar::anchor() {} +void ObjectImage::anchor() {} +void ObjectImageCommon::anchor() {} + namespace llvm { void RuntimeDyldImpl::registerEHFrames() { |