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

Unified Diff: src/PNaClTranslator.cpp

Issue 1848313003: Fix error reporting for parallel parsed function blocks. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 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 | « no previous file | tests_lit/parse_errs/parallel.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/PNaClTranslator.cpp
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index 0bba5c27ef78222d983084fa7dc2bafa3632346e..c73d9162b429fda3f4e2dde514e42add4688b9b2 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -782,7 +782,8 @@ bool BlockParserBaseClass::ErrorAt(naclbitc::ErrorLevel Level, uint64_t Bit,
} else {
StrBuf << Message;
}
- return Context->ErrorAt(Level, Bit, StrBuf.str());
+ return Context->ErrorAt(Level, Record.GetCursor().getErrorBitNo(Bit),
+ StrBuf.str());
}
void BlockParserBaseClass::reportRecordSizeError(size_t ExpectedSize,
@@ -3114,7 +3115,8 @@ private:
std::unique_ptr<Ice::Cfg> CfgParserWorkItem::getParsedCfg() {
NaClBitstreamCursor &OldCursor(ModParser->getCursor());
- llvm::NaClBitstreamReader Reader(Buffer.get(), Buffer.get() + BufferSize,
+ llvm::NaClBitstreamReader Reader(OldCursor.getStartWordByteForBit(StartBit),
+ Buffer.get(), Buffer.get() + BufferSize,
OldCursor.getBitStreamReader());
NaClBitstreamCursor NewCursor(Reader);
NewCursor.JumpToBit(NewCursor.getWordBitNo(StartBit));
« no previous file with comments | « no previous file | tests_lit/parse_errs/parallel.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698