summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-03-08 18:45:12 +0000
committerLang Hames <lhames@gmail.com>2014-03-08 18:45:12 +0000
commitf089b846991d7c4b897584ac30f61a67c9f4e7a9 (patch)
tree7ba6762e4f610952df47195b2b822bdb618166ea /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
parentf911d52a2c057f7358afc6e94f944bdd8c9efe6e (diff)
downloadllvm-f089b846991d7c4b897584ac30f61a67c9f4e7a9.tar.gz
llvm-f089b846991d7c4b897584ac30f61a67c9f4e7a9.tar.bz2
llvm-f089b846991d7c4b897584ac30f61a67c9f4e7a9.tar.xz
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
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h10
1 files changed, 10 insertions, 0 deletions
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