| Index: include/llvm/Bitcode/NaCl/NaClReaderWriter.h
|
| diff --git a/include/llvm/Bitcode/NaCl/NaClReaderWriter.h b/include/llvm/Bitcode/NaCl/NaClReaderWriter.h
|
| index 9806d1c42b8ee447067ada3c23484e4f5f6484d3..3ad7d49dfba04a6a62a1b26fe9e5337c003bdb4e 100644
|
| --- a/include/llvm/Bitcode/NaCl/NaClReaderWriter.h
|
| +++ b/include/llvm/Bitcode/NaCl/NaClReaderWriter.h
|
| @@ -18,17 +18,17 @@
|
|
|
| #include "llvm/Support/CommandLine.h"
|
| #include "llvm/Support/ErrorOr.h"
|
| +#include "llvm/Support/MemoryBuffer.h"
|
|
|
| #include <string>
|
|
|
| namespace llvm {
|
| - class MemoryBuffer;
|
| class LLVMContext;
|
| class Module;
|
| - class raw_ostream;
|
| class NaClBitcodeHeader;
|
| class NaClBitstreamWriter;
|
| class StreamingMemoryObject;
|
| + class raw_ostream;
|
|
|
| /// Defines the data layout used for PNaCl bitcode files. We set the
|
| /// data layout of the module in the bitcode readers rather than in
|
| @@ -59,7 +59,7 @@ namespace llvm {
|
| /// 3) Unreadable.
|
| /// When AcceptSupportedOnly is true, only form 1 is allowed. When
|
| /// AcceptSupportedOnly is false, forms 1 and 2 are allowed.
|
| - ErrorOr<Module *> getNaClLazyBitcodeModule(MemoryBuffer *Buffer,
|
| + ErrorOr<Module *> getNaClLazyBitcodeModule(std::unique_ptr<MemoryBuffer> &&Buffer,
|
| LLVMContext &Context,
|
| raw_ostream *Verbose = nullptr,
|
| bool AcceptSupportedOnly = true);
|
| @@ -81,11 +81,11 @@ namespace llvm {
|
| bool AcceptSupportedOnly = true);
|
|
|
| /// NaClParseBitcodeFile - Read the specified bitcode file,
|
| - /// returning the module. This method *never* takes ownership of Buffer.
|
| + /// returning the module.
|
| ///
|
| /// See getNaClLazyBitcodeModule for an explanation of arguments
|
| /// Verbose, AcceptSupportedOnly.
|
| - ErrorOr<Module *> NaClParseBitcodeFile(MemoryBuffer *Buffer,
|
| + ErrorOr<Module *> NaClParseBitcodeFile(MemoryBufferRef Buffer,
|
| LLVMContext &Context,
|
| raw_ostream *Verbose = nullptr,
|
| bool AcceptSupportedOnly = true);
|
|
|