[llvm] a58c3d3 - Use `std::move` to avoid copy (#113055)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 07:28:03 PST 2024
Author: abhishek-kaushik22
Date: 2024-11-04T07:28:00-08:00
New Revision: a58c3d3ac7c6b2fd9710ab2189d7971ef37e714f
URL: https://github.com/llvm/llvm-project/commit/a58c3d3ac7c6b2fd9710ab2189d7971ef37e714f
DIFF: https://github.com/llvm/llvm-project/commit/a58c3d3ac7c6b2fd9710ab2189d7971ef37e714f.diff
LOG: Use `std::move` to avoid copy (#113055)
Added:
Modified:
llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp b/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
index 5de5dd894f84ec..15ec7e17130de4 100644
--- a/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
+++ b/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
@@ -842,7 +842,7 @@ Error RuleMatcher::defineComplexSubOperand(StringRef SymbolicName,
ComplexSubOperands[SymbolicName] =
std::tuple(ComplexPattern, RendererID, SubOperandID);
- ComplexSubOperandsParentName[SymbolicName] = ParentName;
+ ComplexSubOperandsParentName[SymbolicName] = std::move(ParentName);
return Error::success();
}
More information about the llvm-commits
mailing list