Skip to content

Commit 313d33e

Browse files
authored
[llvm-objdump,SHT_LLVM_BB_ADDR_MAP,NFC] Use auto && instead of const auto & to allow moving from BBAddrMap objects. (#79456)
std::move on `const auto &` references is essentially a noop. Changing to `auto &&` to actually allow moving.
1 parent 7b46225 commit 313d33e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/tools/llvm-objdump/llvm-objdump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,7 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj,
17051705
reportWarning(toString(BBAddrMapsOrErr.takeError()), Obj.getFileName());
17061706
return;
17071707
}
1708-
for (const auto &[FunctionBBAddrMap, FunctionPGOAnalysis] :
1708+
for (auto &&[FunctionBBAddrMap, FunctionPGOAnalysis] :
17091709
zip_equal(*std::move(BBAddrMapsOrErr), std::move(PGOAnalyses))) {
17101710
uint64_t Addr = FunctionBBAddrMap.Addr;
17111711
AddrToBBAddrMap.emplace(Addr, std::move(FunctionBBAddrMap));

0 commit comments

Comments
 (0)