aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Debugify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/Debugify.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Debugify.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp
index a0b7fdb..7063cde 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,