diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp index b9cf36a07846c..0a6ce6a135817 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp @@ -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); assert(BlockLiveIn->Properties.DIExpr->getFragmentInfo() == Var.getFragment() && "Fragment info missing during value prop");