diff options
author | Stephen Tozer <stephen.tozer@sony.com> | 2025-04-28 15:08:18 +0100 |
---|---|---|
committer | Stephen Tozer <stephen.tozer@sony.com> | 2025-04-30 11:39:29 +0100 |
commit | 92195f6fc873cd27a5aa0852252dfe44ccdc6ea0 (patch) | |
tree | f92d5f35e7294895fb59f9139d806230b65a18b0 /llvm/lib/IR/DebugInfo.cpp | |
parent | 77581e27514db084da59738c4d26ed7e70a31736 (diff) | |
download | llvm-92195f6fc873cd27a5aa0852252dfe44ccdc6ea0.zip llvm-92195f6fc873cd27a5aa0852252dfe44ccdc6ea0.tar.gz llvm-92195f6fc873cd27a5aa0852252dfe44ccdc6ea0.tar.bz2 |
Reapply "[DLCov] Implement DebugLoc coverage tracking (#107279)"
Reapplied after fixing the config issue that was causing issues following
the previous merge.
This reverts commit fdbf073a86573c9ac4d595fac8e06d252ce1469f.
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 557b57d..dff9a08 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -988,8 +988,10 @@ void Instruction::updateLocationAfterHoist() { dropLocation(); } void Instruction::dropLocation() { const DebugLoc &DL = getDebugLoc(); - if (!DL) + if (!DL) { + setDebugLoc(DebugLoc::getDropped()); return; + } // If this isn't a call, drop the location to allow a location from a // preceding instruction to propagate. @@ -1001,7 +1003,7 @@ void Instruction::dropLocation() { } if (!MayLowerToCall) { - setDebugLoc(DebugLoc()); + setDebugLoc(DebugLoc::getDropped()); return; } @@ -1020,7 +1022,7 @@ void Instruction::dropLocation() { // // One alternative is to set a line 0 location with the existing scope and // inlinedAt info. The location might be sensitive to when inlining occurs. - setDebugLoc(DebugLoc()); + setDebugLoc(DebugLoc::getDropped()); } //===----------------------------------------------------------------------===// |