[AsmPrinter] DebugLocEntry::dump() - Use const-ref iterator in for-range loop. NFCI.

Avoid unnecessary copies, reported by MSVC static analyzer.
This commit is contained in:
Simon Pilgrim 2021-09-16 18:48:20 +01:00
parent e4b2f66d7f
commit 9e70d4e5f2
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ public:
friend bool operator<(const DbgValueLoc &, const DbgValueLoc &);
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void dump() const {
for (DbgValueLocEntry DV : ValueLocEntries)
for (const DbgValueLocEntry &DV : ValueLocEntries)
DV.dump();
if (Expression)
Expression->dump();