summaryrefslogtreecommitdiff
path: root/include/llvm/Object/Archive.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-24 13:56:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-24 13:56:32 +0000
commit0d50598d71c5cc81c0e777a0ddf3e692e634f565 (patch)
treeb179b244b88112d4c4c3959c85eff70ad202c543 /include/llvm/Object/Archive.h
parentd3aaad2d266afb80bb4be2815d45b4300e3f0c0f (diff)
downloadllvm-0d50598d71c5cc81c0e777a0ddf3e692e634f565.tar.gz
llvm-0d50598d71c5cc81c0e777a0ddf3e692e634f565.tar.bz2
llvm-0d50598d71c5cc81c0e777a0ddf3e692e634f565.tar.xz
Pass a unique_ptr<MemoryBuffer> to the constructors in the Binary hierarchy.
Once the objects are constructed, they own the buffer. Passing a unique_ptr makes that clear. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Object/Archive.h')
-rw-r--r--include/llvm/Object/Archive.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Object/Archive.h b/include/llvm/Object/Archive.h
index 4fe44a7769..af6c995c1d 100644
--- a/include/llvm/Object/Archive.h
+++ b/include/llvm/Object/Archive.h
@@ -164,8 +164,8 @@ public:
}
};
- Archive(MemoryBuffer *source, std::error_code &ec);
- static ErrorOr<Archive *> create(MemoryBuffer *Source);
+ Archive(std::unique_ptr<MemoryBuffer> Source, std::error_code &EC);
+ static ErrorOr<Archive *> create(std::unique_ptr<MemoryBuffer> Source);
enum Kind {
K_GNU,