Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

This patch removes const to allow std::move a couple of lines below to
perform a move operation as intended.

Identified with performance-move-const.

This patch removes const to allow std::move a couple of lines below to
perform a move operation as intended.

Identified with performance-move-const.
@llvmbot
Copy link
Member

llvmbot commented Nov 2, 2025

@llvm/pr-subscribers-tablegen

Author: Kazu Hirata (kazutakahirata)

Changes

This patch removes const to allow std::move a couple of lines below to
perform a move operation as intended.

Identified with performance-move-const.


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

1 Files Affected:

  • (modified) llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp (+1-1)
diff --git a/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp b/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp
index 3f284ee1b1032..b63ce3671f922 100644
--- a/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp
+++ b/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp
@@ -220,7 +220,7 @@ static void emitARMTargetDef(const RecordKeeper &RK, raw_ostream &OS) {
                           ProfileLower + "'");
 
     // Name of the object in C++
-    const std::string CppSpelling = ArchInfoName(Major, Minor, ProfileUpper);
+    std::string CppSpelling = ArchInfoName(Major, Minor, ProfileUpper);
     OS << "inline constexpr ArchInfo " << CppSpelling << " = {\n";
     CppSpellings.push_back(std::move(CppSpelling));
 

@kazutakahirata kazutakahirata merged commit fe01594 into llvm:main Nov 3, 2025
12 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20251102a_clang_tidy_performance-move-const-arg_TableGen branch November 3, 2025 06:43
DEBADRIBASAK pushed a commit to DEBADRIBASAK/llvm-project that referenced this pull request Nov 3, 2025
This patch removes const to allow std::move a couple of lines below to
perform a move operation as intended.

Identified with performance-move-const.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants