[llvm] Use `std::move` to avoid copy (PR #113061)

via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 19 12:34:53 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff f87f3ad6ea8bb80cba9ce009079e1b6c7486feac 5e1e68ba11c116f7c7d72bd7e3b093077debc52b --extensions cpp -- llvm/utils/TableGen/ARMTargetDefEmitter.cpp llvm/utils/TableGen/Common/CodeGenInstAlias.cpp llvm/utils/TableGen/Common/CodeGenInstruction.cpp llvm/utils/TableGen/CompressInstEmitter.cpp llvm/utils/TableGen/OptionParserEmitter.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/utils/TableGen/CompressInstEmitter.cpp b/llvm/utils/TableGen/CompressInstEmitter.cpp
index dfdd1100a5..1edc5c7361 100644
--- a/llvm/utils/TableGen/CompressInstEmitter.cpp
+++ b/llvm/utils/TableGen/CompressInstEmitter.cpp
@@ -115,8 +115,9 @@ class CompressInstEmitter {
     CompressPat(const CodeGenInstruction &S, const CodeGenInstruction &D,
                 std::vector<const Record *> RF, IndexedMap<OpData> &SourceMap,
                 IndexedMap<OpData> &DestMap, bool IsCompressOnly)
-        : Source(S), Dest(D), PatReqFeatures(std::move(RF)), SourceOperandMap(SourceMap),
-          DestOperandMap(DestMap), IsCompressOnly(IsCompressOnly) {}
+        : Source(S), Dest(D), PatReqFeatures(std::move(RF)),
+          SourceOperandMap(SourceMap), DestOperandMap(DestMap),
+          IsCompressOnly(IsCompressOnly) {}
   };
   enum EmitterType { Compress, Uncompress, CheckCompress };
   const RecordKeeper &Records;

``````````

</details>


https://github.com/llvm/llvm-project/pull/113061


More information about the llvm-commits mailing list