[llvm] [TableGen] Use `std::move` to avoid copy (PR #123088)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 09:04:06 PST 2025
https://github.com/abhishek-kaushik22 created https://github.com/llvm/llvm-project/pull/123088
None
>From b862e0a6bd2c5f534f5814b0ea36a6a52dc8aa04 Mon Sep 17 00:00:00 2001
From: abhishek-kaushik22 <abhishek.kaushik at intel.com>
Date: Wed, 15 Jan 2025 22:33:24 +0530
Subject: [PATCH] [TableGen] Use `std::move` to avoid copy
---
llvm/utils/TableGen/DecoderEmitter.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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({
More information about the llvm-commits
mailing list