[llvm] [NFC] Use `std::move` to avoid copy (PR #134531)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 6 05:09:23 PDT 2025
================
@@ -1054,7 +1054,8 @@ void SubtargetEmitter::expandProcResources(
continue;
ConstRecVec SuperResources = PR->getValueAsListOfDefs("Resources");
bool AllContained =
- all_of(SubResources, [SuperResources](const Record *SubResource) {
+ all_of(SubResources, [SuperResources = std::move(SuperResources)](
----------------
RKSimon wrote:
why not just `[&SuperResources]` ?
@kazutakahirata is there an STL version of this - something like `is_all_contained(SuperResources,SubResources)`?
https://github.com/llvm/llvm-project/pull/134531
More information about the llvm-commits
mailing list