Skip to content

Conversation

@abhishek-kaushik22
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Apr 6, 2025

@llvm/pr-subscribers-backend-x86

Author: Abhishek Kaushik (abhishek-kaushik22)

Changes

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

1 Files Affected:

  • (modified) llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp (+1-1)
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
index ad94e306f339e..9660dc6171005 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
@@ -631,7 +631,7 @@ std::vector<std::pair<uint64_t, uint64_t>>
 X86MCInstrAnalysis::findPltEntries(uint64_t PltSectionVA,
                                    ArrayRef<uint8_t> PltContents,
                                    const MCSubtargetInfo &STI) const {
-  const auto TargetTriple = STI.getTargetTriple();
+  const auto &TargetTriple = STI.getTargetTriple();
   switch (TargetTriple.getArch()) {
   case Triple::x86:
     return findX86PltEntries(PltSectionVA, PltContents);

@abhishek-kaushik22 abhishek-kaushik22 changed the title [X86][NFC] Use auto & to avoid copy [X86][NFC] Use Triple & to avoid copy Apr 7, 2025
Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abhishek-kaushik22 abhishek-kaushik22 merged commit 3654621 into llvm:main Apr 7, 2025
11 checks passed
@abhishek-kaushik22 abhishek-kaushik22 deleted the mctargetdesc branch April 7, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants