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

Unified Diff: include/llvm/IRReader/IRReader.h

Issue 770853002: Fix error reporting in the PNaCl bitcode reader. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix typo. Created 6 years 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
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClReaderWriter.h ('k') | lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/llvm/IRReader/IRReader.h
diff --git a/include/llvm/IRReader/IRReader.h b/include/llvm/IRReader/IRReader.h
index 576bb816414f7838d180e1d3eb3642384807f755..e80f8c451c922bd07f029c7399e7dfa6957e02fb 100644
--- a/include/llvm/IRReader/IRReader.h
+++ b/include/llvm/IRReader/IRReader.h
@@ -43,6 +43,8 @@ Module *ParseIRFile(const std::string &Filename, SMDiagnostic &Err,
LLVMContext &Context);
// @LOCALMOD-BEGIN
+class raw_ostream;
+
// \brief Define the expected format of the file.
enum NaClFileFormat {
// LLVM IR source or bitcode file (as appropriate).
@@ -51,21 +53,27 @@ enum NaClFileFormat {
PNaClFormat
};
-// \brief If the given MemoryBuffer holds a bitcode image, return a Module
-// for it. Otherwise, attempt to parse it as LLVM Assembly and return
-// a Module for it. This function *always* takes ownership of the given
-// MemoryBuffer.
+// \brief If the given MemoryBuffer holds a bitcode image, return a
+// Module for it. Otherwise, attempt to parse it as LLVM Assembly and
+// return a Module for it. This function *always* takes ownership of
+// the given MemoryBuffer. When Format=PNaClFormat and Verbose
+// is non-null, more descriptive error messages are also written to
+// Verbose.
Module *NaClParseIR(MemoryBuffer *Buffer,
NaClFileFormat Format,
SMDiagnostic &Err,
+ raw_ostream *Verbose,
LLVMContext &Context);
/// \brief If the given file holds a Bitcode image, read the file.
/// Otherwise, attempt to parse it as LLVM assembly and return a
-/// Module for it.
+/// Module for it. When Format=PNaClFormat and Verbose
+// is non-null, more descriptive error messages are also written to
+// Verbose.
Module *NaClParseIRFile(const std::string &Filename,
NaClFileFormat Format,
SMDiagnostic &Err,
+ raw_ostream *Verbose,
LLVMContext &Context);
// @LOCALMOD-END
}
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClReaderWriter.h ('k') | lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698