diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/Debugify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Debugify.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp index 291e2a5..a0b7fdb 100644 --- a/llvm/lib/Transforms/Utils/Debugify.cpp +++ b/llvm/lib/Transforms/Utils/Debugify.cpp @@ -706,6 +706,15 @@ bool llvm::checkDebugInfoMetadata(Module &M, DILocsBefore, DILocsAfter, InstToDelete, NameOfWrappedPass, FileNameFromCU, ShouldWriteIntoJSON, Bugs); +#if LLVM_ENABLE_DEBUGLOC_TRACKING_COVERAGE + // If we are tracking DebugLoc coverage, replace each empty DebugLoc with an + // annotated location now so that it does not show up in future passes even if + // it is propagated to other instructions. + for (auto &L : DILocsAfter) + if (!L.second) + L.first->setDebugLoc(DebugLoc::getUnknown()); +#endif + bool ResultForVars = checkVars(DIVarsBefore, DIVarsAfter, NameOfWrappedPass, FileNameFromCU, ShouldWriteIntoJSON, Bugs); |