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
This commit is contained in:
Rafael Espindola
2014-06-24 13:56:32 +00:00
parent d3aaad2d26
commit 0d50598d71
21 changed files with 104 additions and 88 deletions

View File

@@ -27,7 +27,8 @@ class IRObjectFile : public SymbolicFile {
std::unique_ptr<Mangler> Mang;
public:
IRObjectFile(MemoryBuffer *Object, std::error_code &EC, LLVMContext &Context);
IRObjectFile(std::unique_ptr<MemoryBuffer> Object, std::error_code &EC,
LLVMContext &Context);
~IRObjectFile();
void moveSymbolNext(DataRefImpl &Symb) const override;
std::error_code printSymbolName(raw_ostream &OS,