llvm.org GIT mirror llvm / fa327ae
[PGO] Fix a use-after-move. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284664 91177308-0d34-0410-b5e6-96231b3b80d8 Rong Xu 2 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
157157 }
158158
159159 for (auto &I : *Reader) {
160 const StringRef FuncName = I.Name;
160161 if (Error E = WC->Writer.addRecord(std::move(I), Input.Weight)) {
161162 // Only show hint the first time an error occurs.
162163 instrprof_error IPE = InstrProfError::take(std::move(E));
163164 std::unique_lock ErrGuard{WC->ErrLock};
164165 bool firstTime = WC->WriterErrorCodes.insert(IPE).second;
165166 handleMergeWriterError(make_error(IPE), Input.Filename,
166 I.Name, firstTime);
167 FuncName, firstTime);
167168 }
168169 }
169170 if (Reader->hasError())