Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: include/llvm/Bitcode/NaCl/NaClReaderWriter.h

Issue 940243003: PNaCl localmod mods in LLVM to 223109 (local files only) (Closed)
Patch Set: fix comment Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,
JF 2015/02/24 05:35:36 Linewrap. Does the function take ownership of the
jvoung (off chromium) 2015/02/24 18:38:48 It is conditional/complicated =). See above comme
JF 2015/02/24 19:32:55 That sounds like ownership :-p The updated documen
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);

Powered by Google App Engine
This is Rietveld 408576698