Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use std::move to avoid copy #113054

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

abhishek-kaushik22
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 19, 2024

@llvm/pr-subscribers-tablegen

Author: None (abhishek-kaushik22)

Changes

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

1 Files Affected:

  • (modified) llvm/utils/TableGen/DecoderEmitter.cpp (+1-1)
diff --git a/llvm/utils/TableGen/DecoderEmitter.cpp b/llvm/utils/TableGen/DecoderEmitter.cpp
index 4d2320b31ea94a..55af5fdc3d6a37 100644
--- a/llvm/utils/TableGen/DecoderEmitter.cpp
+++ b/llvm/utils/TableGen/DecoderEmitter.cpp
@@ -2059,7 +2059,7 @@ populateInstruction(const CodeGenTarget &Target, const Record &EncodingDef,
           MyName = Op.Name;
 
         TiedNames[MyName] = TiedName;
-        TiedNames[TiedName] = MyName;
+        TiedNames[TiedName] = std::move(MyName);
       }
     }
   }

@abhishek-kaushik22 abhishek-kaushik22 changed the title Use std::move to avoid redundant copy Use std::move to avoid copy Oct 19, 2024
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.

2 participants