[llvm] [X86][NFC] Use `auto &` to avoid copy (PR #134532)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 6 05:01:55 PDT 2025


================
@@ -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();
----------------
RKSimon wrote:

(style) avoid auto `const Triple &`

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


More information about the llvm-commits mailing list