aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cfi-verify
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2021-10-12 09:28:20 -0700
committerNathan Sidwell <nathan@acm.org>2021-12-16 07:22:46 -0800
commitdd073e08aeb56b53c148f27226ce6564943bc86e (patch)
treeede16e456e187d8ec01249cfd3020cf86e7b68d1 /llvm/tools/llvm-cfi-verify
parent5fbe21a7748f91adbd1b16c95bbfe180642320a3 (diff)
downloadllvm-dd073e08aeb56b53c148f27226ce6564943bc86e.zip
llvm-dd073e08aeb56b53c148f27226ce6564943bc86e.tar.gz
llvm-dd073e08aeb56b53c148f27226ce6564943bc86e.tar.bz2
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
Diffstat (limited to 'llvm/tools/llvm-cfi-verify')
-rw-r--r--llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp2
1 files changed, 1 insertions, 1 deletions
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());
}