From dd073e08aeb56b53c148f27226ce6564943bc86e Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 12 Oct 2021 09:28:20 -0700 Subject: Avoid by-value copies of referenced objects These were detected by the new -Wauto-by-value-copy (D114989) warning, these by-value constant copies need only be references. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D114990 --- llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/tools/llvm-cfi-verify') diff --git a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp index 421ad21..dac2bda 100644 --- a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp +++ b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp @@ -349,7 +349,7 @@ uint64_t FileAnalysis::indirectCFOperandClobber(const GraphResult &Graph) const // Add the registers this load reads to those we check for clobbers. for (unsigned i = InstrDesc.getNumDefs(), e = InstrDesc.getNumOperands(); i != e; i++) { - const auto Operand = NodeInstr.Instruction.getOperand(i); + const auto &Operand = NodeInstr.Instruction.getOperand(i); if (Operand.isReg()) CurRegisterNumbers.insert(Operand.getReg()); } -- cgit v1.1