From f089b846991d7c4b897584ac30f61a67c9f4e7a9 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Sat, 8 Mar 2014 18:45:12 +0000 Subject: Make createObjectImage and createObjectImageFromFile static methods on the relevant subclasses of RuntimeDyldImpl. This allows construction of RuntimeDyldImpl instances to be deferred until after the target architecture is known. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203352 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h') diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h index bddf37958f..1a285ffbfb 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h @@ -14,6 +14,7 @@ #ifndef LLVM_RUNTIME_DYLD_MACHO_H #define LLVM_RUNTIME_DYLD_MACHO_H +#include "ObjectImageCommon.h" #include "RuntimeDyldImpl.h" #include "llvm/ADT/IndexedMap.h" #include "llvm/Object/MachO.h" @@ -95,6 +96,15 @@ public: bool isCompatibleFile(const object::ObjectFile *Obj) const override; void registerEHFrames() override; void finalizeLoad(ObjSectionToIDMap &SectionMap) override; + + + static ObjectImage *createObjectImage(ObjectBuffer *InputBuffer) { + return new ObjectImageCommon(InputBuffer); + } + + static ObjectImage *createObjectImageFromFile(object::ObjectFile *InputObject) { + return new ObjectImageCommon(InputObject); + } }; } // end namespace llvm -- cgit v1.2.3