aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/OffloadBundle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/OffloadBundle.cpp')
-rw-r--r--llvm/lib/Object/OffloadBundle.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Object/OffloadBundle.cpp b/llvm/lib/Object/OffloadBundle.cpp
index a6a9628a..0dd378e 100644
--- a/llvm/lib/Object/OffloadBundle.cpp
+++ b/llvm/lib/Object/OffloadBundle.cpp
@@ -120,15 +120,14 @@ OffloadBundleFatBin::create(MemoryBufferRef Buf, uint64_t SectionOffset,
if (identify_magic(Buf.getBuffer()) != file_magic::offload_bundle)
return errorCodeToError(object_error::parse_failed);
- std::unique_ptr<OffloadBundleFatBin> TheBundle(
- new OffloadBundleFatBin(Buf, FileName));
+ OffloadBundleFatBin *TheBundle = new OffloadBundleFatBin(Buf, FileName);
// Read the Bundle Entries
Error Err = TheBundle->readEntries(Buf.getBuffer(), SectionOffset);
if (Err)
return Err;
- return TheBundle;
+ return std::unique_ptr<OffloadBundleFatBin>(TheBundle);
}
Error OffloadBundleFatBin::extractBundle(const ObjectFile &Source) {