| Index: src/PNaClTranslator.cpp
|
| diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
|
| index 35cdcf7ab6a81134edf4129eec2767de8f9dcd9e..ce462396537e1990410eae780ab88bf4289e49db 100644
|
| --- a/src/PNaClTranslator.cpp
|
| +++ b/src/PNaClTranslator.cpp
|
| @@ -486,10 +486,12 @@ bool TopLevelParser::ErrorAt(naclbitc::ErrorLevel Level, uint64_t Bit,
|
| ErrorStatus.assign(Ice::EC_Bitcode);
|
| ++NumErrors;
|
| Ice::GlobalContext *Context = Translator.getContext();
|
| - Ice::OstreamLocker L(Context);
|
| - raw_ostream &OldErrStream = setErrStream(Context->getStrDump());
|
| - NaClBitcodeParser::ErrorAt(Level, Bit, Message);
|
| - setErrStream(OldErrStream);
|
| + { // Lock while printing out error message.
|
| + Ice::OstreamLocker L(Context);
|
| + raw_ostream &OldErrStream = setErrStream(Context->getStrDump());
|
| + NaClBitcodeParser::ErrorAt(Level, Bit, Message);
|
| + setErrStream(OldErrStream);
|
| + }
|
| if (Level >= naclbitc::Error &&
|
| !Translator.getFlags().getAllowErrorRecovery())
|
| Fatal();
|
|
|