Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3361,7 +3361,7 @@ void InstrRefBasedLDV::buildVLocValueMap(
continue;
if (BlockLiveIn->Kind == DbgValue::VPHI)
BlockLiveIn->Kind = DbgValue::Def;
auto &[Var, DILoc] = DVMap.lookupDVID(VarID);
[[maybe_unused]] auto &[Var, DILoc] = DVMap.lookupDVID(VarID);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW/next time, I'd consider rolling this into the assert, maybe?

      assert(BlockLiveIn->Properties.DIExpr->getFragmentInfo() ==
                 DVMap.lookupDVID(VarID).first.getFragment() &&
               ...

(so the optimizer doesn't have to deal with the lookup code in nonasserts builds)
(and/or if the named variable helped with readability/was needed for other reasons, maybe using auto &VarID = ...(VarID).first; ? rather than needing to name an extra fully unused variable (DILoc))

assert(BlockLiveIn->Properties.DIExpr->getFragmentInfo() ==
Var.getFragment() &&
"Fragment info missing during value prop");
Expand Down