[perf] Replace copy-assign by move-assign in llvm/lib/IR/* (#178175)

This commit is contained in:
serge-sans-paille 2026-01-27 20:46:47 +00:00 committed by GitHub
parent 4a60ee9332
commit 9e62b779cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -1010,13 +1010,13 @@ int ModuleSlotTracker::getLocalSlot(const Value *V) {
void ModuleSlotTracker::setProcessHook(
std::function<void(AbstractSlotTrackerStorage *, const Module *, bool)>
Fn) {
ProcessModuleHookFn = Fn;
ProcessModuleHookFn = std::move(Fn);
}
void ModuleSlotTracker::setProcessHook(
std::function<void(AbstractSlotTrackerStorage *, const Function *, bool)>
Fn) {
ProcessFunctionHookFn = Fn;
ProcessFunctionHookFn = std::move(Fn);
}
static SlotTracker *createSlotTracker(const Value *V) {
@ -1304,13 +1304,13 @@ int SlotTracker::getGlobalSlot(const GlobalValue *V) {
void SlotTracker::setProcessHook(
std::function<void(AbstractSlotTrackerStorage *, const Module *, bool)>
Fn) {
ProcessModuleHookFn = Fn;
ProcessModuleHookFn = std::move(Fn);
}
void SlotTracker::setProcessHook(
std::function<void(AbstractSlotTrackerStorage *, const Function *, bool)>
Fn) {
ProcessFunctionHookFn = Fn;
ProcessFunctionHookFn = std::move(Fn);
}
/// getMetadataSlot - Get the slot number of a MDNode.

View File

@ -139,7 +139,7 @@ void ConstantRangeList::subtract(const ConstantRange &SubRange) {
}
}
Ranges = Result;
Ranges = std::move(Result);
}
ConstantRangeList