diff options
author | Lang Hames <lhames@gmail.com> | 2014-01-08 04:09:09 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-01-08 04:09:09 +0000 |
commit | 42fdb1f00ffc5d0a0326f11cadaeec1c26691688 (patch) | |
tree | 5294abeb5fb8c95d81ced305ed1a9d5d0ba7849b /lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h | |
parent | 0fe78d5669e37cf9c5b613ef56b4e5a2de975271 (diff) | |
download | llvm-42fdb1f00ffc5d0a0326f11cadaeec1c26691688.tar.gz llvm-42fdb1f00ffc5d0a0326f11cadaeec1c26691688.tar.bz2 llvm-42fdb1f00ffc5d0a0326f11cadaeec1c26691688.tar.xz |
Re-apply r196639: Add support for archives and object file caching under MCJIT.
I believe the bot failures on linux systems were due to overestimating the
alignment of object-files within archives, which are only guaranteed to be
two-byte aligned. I have reduced the alignment in
RuntimeDyldELF::createObjectImageFromFile accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h')
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h b/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h index 28680044a3..7666a869d6 100644 --- a/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h +++ b/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h @@ -20,6 +20,10 @@ namespace llvm { +namespace object { + class ObjectFile; +} + class ObjectImageCommon : public ObjectImage { ObjectImageCommon(); // = delete ObjectImageCommon(const ObjectImageCommon &other); // = delete @@ -42,6 +46,8 @@ public: { ObjFile = object::ObjectFile::createObjectFile(Buffer->getMemBuffer()); } + ObjectImageCommon(object::ObjectFile* Input) + : ObjectImage(NULL), ObjFile(Input) {} virtual ~ObjectImageCommon() { delete ObjFile; } virtual object::symbol_iterator begin_symbols() const |