diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h index 62ebadaf3cbeb..d7ab2091967fa 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h +++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h @@ -158,7 +158,7 @@ class DbgValueLoc { 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();