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

Unified Diff: lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp

Issue 986453002: Additional clean ups on errors in bitcode parsing. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix comment. Created 5 years, 9 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 | « lib/Bitcode/NaCl/Reader/NaClBitcodeParser.cpp ('k') | lib/Bitcode/NaCl/Reader/NaClBitstreamReader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
index c1fb4a84aa1e43f69db9317cd7a38470143cc4c1..fca2ee760e09af1c50b2356626c1931c8b8e191b 100644
--- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
+++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
@@ -192,10 +192,8 @@ static_assert(
std::error_code NaClBitcodeReader::Error(ErrorType E,
const std::string &Message) const {
if (Verbose) {
- uint64_t Bit = Stream.GetCurrentBitNo();
- *Verbose << "Error: (" << (Bit / CHAR_BIT) << ":"
- << static_cast<unsigned>(Bit % CHAR_BIT)
- << ") " << Message << "\n";
+ naclbitc::ErrorAt(*Verbose, naclbitc::Error, Stream.GetCurrentBitNo())
+ << Message << "\n";
}
return Error(E);
}
« no previous file with comments | « lib/Bitcode/NaCl/Reader/NaClBitcodeParser.cpp ('k') | lib/Bitcode/NaCl/Reader/NaClBitstreamReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698