Skip to content

Commit 5cedb01

Browse files
committed
[Debugify] Fix compile error in tracking coverage build
Forward-fixes a compile error in bc216b0 (#150212) in specific build configurations, due to a missing const_cast.
1 parent d0029b8 commit 5cedb01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Utils/Debugify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ bool llvm::checkDebugInfoMetadata(Module &M,
712712
// it is propagated to other instructions.
713713
for (auto &L : DILocsAfter)
714714
if (!L.second)
715-
L.first->setDebugLoc(DebugLoc::getUnknown());
715+
const_cast<Instruction *>(L.first)->setDebugLoc(DebugLoc::getUnknown());
716716
#endif
717717

718718
bool ResultForVars = checkVars(DIVarsBefore, DIVarsAfter, NameOfWrappedPass,

0 commit comments

Comments
 (0)