Skip to content

Commit fe01594

Browse files
[TableGen] Use std::move properly (NFC) (#166104)
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.
1 parent 3c0d4aa commit fe01594

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static void emitARMTargetDef(const RecordKeeper &RK, raw_ostream &OS) {
220220
ProfileLower + "'");
221221

222222
// Name of the object in C++
223-
const std::string CppSpelling = ArchInfoName(Major, Minor, ProfileUpper);
223+
std::string CppSpelling = ArchInfoName(Major, Minor, ProfileUpper);
224224
OS << "inline constexpr ArchInfo " << CppSpelling << " = {\n";
225225
CppSpellings.push_back(std::move(CppSpelling));
226226

0 commit comments

Comments
 (0)