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

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 09:04:42 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-tablegen

Author: None (abhishek-kaushik22)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/123088.diff


1 Files Affected:

- (modified) llvm/utils/TableGen/DecoderEmitter.cpp (+1-1) 


``````````diff
diff --git a/llvm/utils/TableGen/DecoderEmitter.cpp b/llvm/utils/TableGen/DecoderEmitter.cpp
index 90a6d0ee8acb57..3f79de3139fbd3 100644
--- a/llvm/utils/TableGen/DecoderEmitter.cpp
+++ b/llvm/utils/TableGen/DecoderEmitter.cpp
@@ -2146,7 +2146,7 @@ populateInstruction(const CodeGenTarget &Target, const Record &EncodingDef,
         InsnOperands.push_back(std::move(OpInfo));
     }
   }
-  Operands[Opc] = InsnOperands;
+  Operands[Opc] = std::move(InsnOperands);
 
 #if 0
   LLVM_DEBUG({

``````````

</details>


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


More information about the llvm-commits mailing list