Index: lib/Bitcode/NaCl/Analysis/NaClObjDump.cpp |
diff --git a/lib/Bitcode/NaCl/Analysis/NaClObjDump.cpp b/lib/Bitcode/NaCl/Analysis/NaClObjDump.cpp |
index d57caa9566ed92bddef4914df7eede2afebd7ff8..1ee07b3231a2523423aeae6ade0bea15dabc5b83 100644 |
--- a/lib/Bitcode/NaCl/Analysis/NaClObjDump.cpp |
+++ b/lib/Bitcode/NaCl/Analysis/NaClObjDump.cpp |
@@ -589,25 +589,15 @@ public: |
} |
/// Generates an error with the given message. |
- bool ErrorAt(uint64_t Bit, const std::string &Message) final { |
- // Use local error routine so that all errors are treated uniformly. |
- ObjDump.Error(Bit) << Message << "\n"; |
+ bool ErrorAt(naclbitc::ErrorLevel Level, uint64_t Bit, |
+ const std::string &Message) final { |
+ if (Level == naclbitc::Fatal) |
jvoung (off chromium)
2015/03/06 22:30:28
How come Fatal is called out specially?
Karl
2015/03/06 22:54:20
Under the new scheme, within a bitcode parser, all
jvoung (off chromium)
2015/03/07 00:04:35
I think if (a) only this method needs to worry abo
Karl
2015/03/09 18:10:54
Ok. I was able to clean things up and remove both
|
+ ObjDump.FatalAt(Bit, Message); |
+ else |
+ ObjDump.ErrorAt(Level, Bit) << Message << "\n"; |
return true; |
} |
- /// Flushes out objdump and then exits with fatal error. |
- LLVM_ATTRIBUTE_NORETURN |
- void Fatal() { |
- NaClBitcodeParser::Fatal(); |
- } |
- |
- /// Flushes out objdump and then exits with fatal error, using |
- /// the given message. |
- LLVM_ATTRIBUTE_NORETURN |
- void FatalAt(uint64_t Bit, const std::string &Message) final { |
- ObjDump.Fatal(Bit, Message); |
- } |
- |
/// Parses the top-level module block. |
bool ParseBlock(unsigned BlockID) override; |
@@ -1365,12 +1355,9 @@ protected: |
return Context->Warnings(); |
} |
- void Fatal() { |
- return Context->Fatal(); |
- } |
- |
- void FatalAt(uint64_t Bit, const std::string &Message) override { |
- return Context->FatalAt(Bit, Message); |
+ bool ErrorAt(naclbitc::ErrorLevel Level, uint64_t Bit, |
+ const std::string &Message) final { |
+ return Context->ErrorAt(Level, Bit, Message); |
} |
const std::string &GetAssemblyIndent() const { |