[llvm] 5cedb01 - [Debugify] Fix compile error in tracking coverage build
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 03:19:04 PDT 2025
Author: Stephen Tozer
Date: 2025-08-19T11:18:42+01:00
New Revision: 5cedb0148740e85f1b810e13db1c15ecd2388779
URL: https://github.com/llvm/llvm-project/commit/5cedb0148740e85f1b810e13db1c15ecd2388779
DIFF: https://github.com/llvm/llvm-project/commit/5cedb0148740e85f1b810e13db1c15ecd2388779.diff
LOG: [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.
Added:
Modified:
llvm/lib/Transforms/Utils/Debugify.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp
index a0b7fdb42fa0d..7063cde5263b4 100644
--- a/llvm/lib/Transforms/Utils/Debugify.cpp
+++ b/llvm/lib/Transforms/Utils/Debugify.cpp
@@ -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,
More information about the llvm-commits
mailing list