[Debugify] Fix compile error in tracking coverage build

Forward-fixes a compile error in bc216b057d (#150212) in specific build
configurations, due to a missing const_cast.
This commit is contained in:
Stephen Tozer 2025-08-15 17:39:51 +01:00
parent d0029b87d8
commit 5cedb01487

View File

@ -712,7 +712,7 @@ bool llvm::checkDebugInfoMetadata(Module &M,
// it is propagated to other instructions.
for (auto &L : DILocsAfter)
if (!L.second)
L.first->setDebugLoc(DebugLoc::getUnknown());
const_cast<Instruction *>(L.first)->setDebugLoc(DebugLoc::getUnknown());
#endif
bool ResultForVars = checkVars(DIVarsBefore, DIVarsAfter, NameOfWrappedPass,