Pass a std::unique_ptr<MemoryBuffer>& to getLazyBitcodeModule.
[oota-llvm.git] / include / llvm / Bitcode / ReaderWriter.h
index c1eca8d9eafd127506899d9a01b58c3cb5c2faf9..287311032f22bf4bdc85fd6ed2110da97bea23f6 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "llvm/Support/ErrorOr.h"
 #include "llvm/Support/MemoryBuffer.h"
+#include <memory>
 #include <string>
 
 namespace llvm {
@@ -29,7 +30,7 @@ namespace llvm {
   /// Read the header of the specified bitcode buffer and prepare for lazy
   /// deserialization of function bodies.  If successful, this takes ownership
   /// of 'buffer. On error, this *does not* take ownership of Buffer.
-  ErrorOr<Module *> getLazyBitcodeModule(MemoryBuffer *Buffer,
+  ErrorOr<Module *> getLazyBitcodeModule(std::unique_ptr<MemoryBuffer> &Buffer,
                                          LLVMContext &Context);
 
   /// getStreamedBitcodeModule - Read the header of the specified stream