Skip to content

Commit 5c7af2f

Browse files
author
git apple-llvm automerger
committed
Merge commit 'b80b48d3e89e' from llvm.org/main into next
2 parents 3ccdd0f + b80b48d commit 5c7af2f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Object/OffloadBundle.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,15 @@ OffloadBundleFatBin::create(MemoryBufferRef Buf, uint64_t SectionOffset,
120120
if (identify_magic(Buf.getBuffer()) != file_magic::offload_bundle)
121121
return errorCodeToError(object_error::parse_failed);
122122

123-
OffloadBundleFatBin *TheBundle = new OffloadBundleFatBin(Buf, FileName);
123+
std::unique_ptr<OffloadBundleFatBin> TheBundle(
124+
new OffloadBundleFatBin(Buf, FileName));
124125

125126
// Read the Bundle Entries
126127
Error Err = TheBundle->readEntries(Buf.getBuffer(), SectionOffset);
127128
if (Err)
128129
return Err;
129130

130-
return std::unique_ptr<OffloadBundleFatBin>(TheBundle);
131+
return TheBundle;
131132
}
132133

133134
Error OffloadBundleFatBin::extractBundle(const ObjectFile &Source) {

0 commit comments

Comments
 (0)