//
//===----------------------------------------------------------------------===//
+#include "llvm/Object/COFF.h"
+#include "llvm/Object/MachO.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
return section_iterator(SectionRef(Sec, this));
}
-ErrorOr<ObjectFile *>
+ErrorOr<std::unique_ptr<ObjectFile>>
ObjectFile::createObjectFile(std::unique_ptr<MemoryBuffer> &Object,
sys::fs::file_magic Type) {
if (Type == sys::fs::file_magic::unknown)
llvm_unreachable("Unexpected Object File Type");
}
-ErrorOr<ObjectFile *> ObjectFile::createObjectFile(StringRef ObjectPath) {
+ErrorOr<std::unique_ptr<ObjectFile>>
+ObjectFile::createObjectFile(StringRef ObjectPath) {
ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
MemoryBuffer::getFile(ObjectPath);
if (std::error_code EC = FileOrErr.getError())