Return a std::unique_ptr when creating a new MemoryBuffer.
llvm-svn: 216583
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 3360256..fd505b0 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -276,8 +276,8 @@
message(LDPL_ERROR, "Failed to get a view of %s", file->name);
return LDPS_ERR;
}
- buffer.reset(MemoryBuffer::getMemBuffer(
- StringRef((char *)view, file->filesize), "", false));
+ buffer = MemoryBuffer::getMemBuffer(StringRef((char *)view, file->filesize),
+ "", false);
} else {
int64_t offset = 0;
// Gold has found what might be IR part-way inside of a file, such as