[perf] Replace copy-assign by move-assign in llvm/lib/Object(YAML)/* (#178177)

This commit is contained in:
serge-sans-paille 2026-01-27 16:28:29 +00:00 committed by GitHub
parent d69ad211b5
commit cc04746802
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -504,7 +504,7 @@ GOFFObjectFile::getSectionContents(DataRefImpl Sec) const {
Data.begin() + TxtDataOffset);
}
auto &Cache = SectionDataCache[Sec.d.a];
Cache = Data;
Cache = std::move(Data);
return ArrayRef<uint8_t>(Cache);
}

View File

@ -627,7 +627,7 @@ fromCodeViewSymbolImpl(CVSymbol Symbol) {
auto Impl = std::make_shared<SymbolType>(Symbol.kind());
if (auto EC = Impl->fromCodeViewSymbol(Symbol))
return std::move(EC);
Result.Symbol = Impl;
Result.Symbol = std::move(Impl);
return Result;
}

View File

@ -681,7 +681,7 @@ static inline Expected<LeafRecord> fromCodeViewRecordImpl(CVType Type) {
auto Impl = std::make_shared<LeafRecordImpl<T>>(Type.kind());
if (auto EC = Impl->fromCodeViewRecord(Type))
return std::move(EC);
Result.Leaf = Impl;
Result.Leaf = std::move(Impl);
return Result;
}