diff options
author | Nathan Sidwell <nathan@acm.org> | 2021-10-12 09:28:20 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2021-12-16 07:22:46 -0800 |
commit | dd073e08aeb56b53c148f27226ce6564943bc86e (patch) | |
tree | ede16e456e187d8ec01249cfd3020cf86e7b68d1 /llvm/tools/llvm-cfi-verify | |
parent | 5fbe21a7748f91adbd1b16c95bbfe180642320a3 (diff) | |
download | llvm-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.cpp | 2 |
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()); } |