From 0d51b6ab1587a5d5d649cc5c1a9bc9e7e6d8de2c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 18 Jan 2022 17:17:40 +0100 Subject: [PATCH] [DebugInstrRef] Add some missing const qualifiers (NFC) --- llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp index 5d72428..849f289 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp @@ -251,9 +251,10 @@ public: /// creates DBG_VALUEs and puts them in #Transfers, then prepares the other /// object fields to track variable locations as we step through the block. /// FIXME: could just examine mloctracker instead of passing in \p mlocs? - void loadInlocs(MachineBasicBlock &MBB, ValueIDNum *MLocs, - SmallVectorImpl> &VLocs, - unsigned NumLocs) { + void + loadInlocs(MachineBasicBlock &MBB, ValueIDNum *MLocs, + const SmallVectorImpl> &VLocs, + unsigned NumLocs) { ActiveMLocs.clear(); ActiveVLocs.clear(); VarLocs.clear(); @@ -303,7 +304,7 @@ public: } // Now map variables to their picked LocIdxes. - for (auto Var : VLocs) { + for (const auto &Var : VLocs) { if (Var.second.Kind == DbgValue::Const) { PendingDbgValues.push_back( emitMOLoc(*Var.second.MO, Var.first, Var.second.Properties)); @@ -418,7 +419,8 @@ public: return Reg != SP && Reg != FP; } - bool recoverAsEntryValue(const DebugVariable &Var, DbgValueProperties &Prop, + bool recoverAsEntryValue(const DebugVariable &Var, + const DbgValueProperties &Prop, const ValueIDNum &Num) { // Is this variable location a candidate to be an entry value. First, // should we be trying this at all? -- 2.7.4