[BOLT] Fix data race in shortenInstructions

Address ThreadSanitizer warning

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D121338
This commit is contained in:
Amir Ayupov
2022-04-13 11:09:25 -07:00
parent 38823b7f5f
commit bad3798113

View File

@@ -1015,6 +1015,7 @@ uint64_t ShortenInstructions::shortenInstructions(BinaryFunction &Function) {
continue;
if (opts::Verbosity > 2) {
BC.scopeLock();
outs() << "BOLT-INFO: shortening:\nBOLT-INFO: ";
BC.printInstruction(outs(), OriginalInst, 0, &Function);
outs() << "BOLT-INFO: to:";