summaryrefslogtreecommitdiff
path: root/include/llvm/Object/ObjectFile.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Object/ObjectFile.h')
-rw-r--r--include/llvm/Object/ObjectFile.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h
index 56799eb681..646abf80f8 100644
--- a/include/llvm/Object/ObjectFile.h
+++ b/include/llvm/Object/ObjectFile.h
@@ -208,7 +208,7 @@ class ObjectFile : public SymbolicFile {
ObjectFile(const ObjectFile &other) LLVM_DELETED_FUNCTION;
protected:
- ObjectFile(unsigned int Type, MemoryBuffer *Source);
+ ObjectFile(unsigned int Type, std::unique_ptr<MemoryBuffer> Source);
const uint8_t *base() const {
return reinterpret_cast<const uint8_t *>(Data->getBufferStart());
@@ -347,7 +347,8 @@ public:
}
public:
- static ErrorOr<ObjectFile *> createCOFFObjectFile(MemoryBuffer *Object);
+ static ErrorOr<ObjectFile *>
+ createCOFFObjectFile(std::unique_ptr<MemoryBuffer> Object);
static ErrorOr<ObjectFile *>
createELFObjectFile(std::unique_ptr<MemoryBuffer> &Object);
static ErrorOr<ObjectFile *>