| Index: include/llvm/Bitcode/NaCl/NaClBitcodeParser.h
|
| diff --git a/include/llvm/Bitcode/NaCl/NaClBitcodeParser.h b/include/llvm/Bitcode/NaCl/NaClBitcodeParser.h
|
| index 06ad98a92ff1d5d18bc62165b0246c83020386c5..d4e06e062279060dfa7fb91a1aad41a23e3eaa15 100644
|
| --- a/include/llvm/Bitcode/NaCl/NaClBitcodeParser.h
|
| +++ b/include/llvm/Bitcode/NaCl/NaClBitcodeParser.h
|
| @@ -499,8 +499,14 @@ public:
|
|
|
| // Called when an error occurs. BitPosition is the bit position the
|
| // error was found, and Message is the error to report. Always
|
| - // returns true (the error return value of Parse).
|
| - virtual bool ErrorAt(uint64_t BitPosition, const std::string &Message);
|
| + // returns true (the error return value of Parse). Level is
|
| + // the severity of the error.
|
| + virtual bool ErrorAt(naclbitc::ErrorLevel Level, uint64_t BitPosition,
|
| + const std::string &Message);
|
| +
|
| + bool ErrorAt(uint64_t BitPosition, const std::string &Message) {
|
| + return ErrorAt(naclbitc::Error, BitPosition, Message);
|
| + }
|
|
|
| // Called when an error occurs. Message is the error to
|
| // report. Always returns true (the error return value of Parse).
|
| @@ -512,7 +518,10 @@ public:
|
| // the error was found, and Message is the error to report. Does not
|
| // return.
|
| LLVM_ATTRIBUTE_NORETURN
|
| - virtual void FatalAt(uint64_t BitPosition, const std::string &Message);
|
| + void FatalAt(uint64_t BitPosition, const std::string &Message) {
|
| + ErrorAt(naclbitc::Fatal, BitPosition, Message);
|
| + llvm_unreachable("Fatal errors should not return");
|
| + }
|
|
|
| // Called when a fatal error occurs. Message is the error to
|
| // report. Does not return.
|
|
|