mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
Make ObjectFile ownership of the MemoryBuffer optional.
This allows llvm-ar to mmap the input files only once. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200040 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -165,7 +165,7 @@ protected:
|
||||
bool isDyldELFObject;
|
||||
|
||||
public:
|
||||
ELFObjectFile(MemoryBuffer *Object, error_code &ec);
|
||||
ELFObjectFile(MemoryBuffer *Object, error_code &EC, bool BufferOwned = true);
|
||||
|
||||
const Elf_Sym *getSymbol(DataRefImpl Symb) const;
|
||||
|
||||
@ -813,11 +813,12 @@ ELFObjectFile<ELFT>::getRela(DataRefImpl Rela) const {
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
ELFObjectFile<ELFT>::ELFObjectFile(MemoryBuffer *Object, error_code &ec)
|
||||
ELFObjectFile<ELFT>::ELFObjectFile(MemoryBuffer *Object, error_code &ec,
|
||||
bool BufferOwned)
|
||||
: ObjectFile(getELFType(static_cast<endianness>(ELFT::TargetEndianness) ==
|
||||
support::little,
|
||||
ELFT::Is64Bits),
|
||||
Object),
|
||||
Object, BufferOwned),
|
||||
EF(Object, ec) {}
|
||||
|
||||
template <class ELFT>
|
||||
|
Reference in New Issue
Block a user