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

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

Issue 1310883003: Install notion of diagnostic handler into PNaCl bitcode readers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix issues in patch set 2. Created 5 years, 4 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
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClReaderWriter.h ('k') | lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp » ('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 1816e0a2e36cdcff2c4c1f2a02586b5b79fb9887..46e4d31d2deec42b7aaaf37ee987dcfe86124be2 100644
--- a/include/llvm/IRReader/IRReader.h
+++ b/include/llvm/IRReader/IRReader.h
@@ -15,6 +15,7 @@
#ifndef LLVM_IRREADER_IRREADER_H
#define LLVM_IRREADER_IRREADER_H
+#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/Support/MemoryBuffer.h"
#include <string>
@@ -59,25 +60,19 @@ enum NaClFileFormat {
// \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. When Format=PNaClFormat and Verbose
-// is non-null, more descriptive error messages are also written to
-// Verbose.
-std::unique_ptr<Module> NaClParseIR(MemoryBufferRef Buffer,
- NaClFileFormat Format,
- SMDiagnostic &Err,
- raw_ostream *Verbose,
- LLVMContext &Context);
+// return a Module for it.
+std::unique_ptr<Module>
+NaClParseIR(MemoryBufferRef Buffer, NaClFileFormat Format, SMDiagnostic &Err,
+ LLVMContext &Context,
+ DiagnosticHandlerFunction DiagnosticHandler = nullptr);
/// \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. When Format=PNaClFormat and Verbose
-// is non-null, more descriptive error messages are also written to
-// Verbose.
-std::unique_ptr<Module> NaClParseIRFile(StringRef Filename,
- NaClFileFormat Format,
- SMDiagnostic &Err,
- raw_ostream *Verbose,
- LLVMContext &Context);
+/// Module for it.
+std::unique_ptr<Module>
+NaClParseIRFile(StringRef Filename, NaClFileFormat Format, SMDiagnostic &Err,
+ LLVMContext &Context,
+ DiagnosticHandlerFunction DiagnosticHandler = nullptr);
// @LOCALMOD-END
}
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClReaderWriter.h ('k') | lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698