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

Side by Side Diff: lib/Bitcode/NaCl/Reader/NaClBitstreamReader.cpp

Issue 1851163002: Correct error reporting bit for parallel PNaCl bitcode parses. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix nit. Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClBitstreamReader.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- NaClBitstreamReader.cpp --------------------------------------------===// 1 //===- NaClBitstreamReader.cpp --------------------------------------------===//
2 // NaClBitstreamReader implementation 2 // NaClBitstreamReader implementation
3 // 3 //
4 // The LLVM Compiler Infrastructure 4 // The LLVM Compiler Infrastructure
5 // 5 //
6 // This file is distributed under the University of Illinois Open Source 6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details. 7 // License. See LICENSE.TXT for details.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 //===----------------------------------------------------------------------===// 42 //===----------------------------------------------------------------------===//
43 // NaClBitstreamCursor implementation 43 // NaClBitstreamCursor implementation
44 //===----------------------------------------------------------------------===// 44 //===----------------------------------------------------------------------===//
45 45
46 void NaClBitstreamCursor::ErrorHandler:: 46 void NaClBitstreamCursor::ErrorHandler::
47 Fatal(const std::string &ErrorMessage) const { 47 Fatal(const std::string &ErrorMessage) const {
48 // Default implementation is simply print message, and the bit where 48 // Default implementation is simply print message, and the bit where
49 // the error occurred. 49 // the error occurred.
50 std::string Buffer; 50 std::string Buffer;
51 raw_string_ostream StrBuf(Buffer); 51 raw_string_ostream StrBuf(Buffer);
52 naclbitc::ErrorAt(StrBuf, naclbitc::Fatal, getCurrentBitNo()) << ErrorMessage; 52 naclbitc::ErrorAt(StrBuf, naclbitc::Fatal,
53 Cursor.getErrorBitNo(getCurrentBitNo())) << ErrorMessage;
53 report_fatal_error(StrBuf.str()); 54 report_fatal_error(StrBuf.str());
54 } 55 }
55 56
56 void NaClBitstreamCursor::reportInvalidAbbrevNumber(unsigned AbbrevNo) const { 57 void NaClBitstreamCursor::reportInvalidAbbrevNumber(unsigned AbbrevNo) const {
57 std::string Buffer; 58 std::string Buffer;
58 raw_string_ostream StrBuf(Buffer); 59 raw_string_ostream StrBuf(Buffer);
59 StrBuf << "Invalid abbreviation # " << AbbrevNo << " defined for record"; 60 StrBuf << "Invalid abbreviation # " << AbbrevNo << " defined for record";
60 ErrHandler->Fatal(StrBuf.str()); 61 ErrHandler->Fatal(StrBuf.str());
61 } 62 }
62 63
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 UpdateAbbrevs = 435 UpdateAbbrevs =
435 &BitStream->getBlockInfo((unsigned)Record[0])->getAbbrevs(); 436 &BitStream->getBlockInfo((unsigned)Record[0])->getAbbrevs();
436 if (Listener) { 437 if (Listener) {
437 Listener->Values = Record; 438 Listener->Values = Record;
438 Listener->SetBID(); 439 Listener->SetBID();
439 } 440 }
440 break; 441 break;
441 } 442 }
442 } 443 }
443 } 444 }
OLDNEW
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClBitstreamReader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698