Use std::unique_ptr to manage the DataStreamer in bitcode parsing.

We were already deleting it, this just makes it explicit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239867 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-06-16 23:29:49 +00:00
parent 3fea1651f6
commit 4a4558e436
8 changed files with 55 additions and 48 deletions

View File

@@ -41,7 +41,8 @@ namespace llvm {
/// Read the header of the specified stream and prepare for lazy
/// deserialization and streaming of function bodies.
ErrorOr<std::unique_ptr<Module>> getStreamedBitcodeModule(
StringRef Name, DataStreamer *Streamer, LLVMContext &Context,
StringRef Name, std::unique_ptr<DataStreamer> Streamer,
LLVMContext &Context,
DiagnosticHandlerFunction DiagnosticHandler = nullptr);
/// Read the header of the specified bitcode buffer and extract just the