aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Debugify.cpp
diff options
context:
space:
mode:
authorStephen Tozer <stephen.tozer@sony.com>2025-04-25 00:36:28 +0100
committerStephen Tozer <stephen.tozer@sony.com>2025-04-25 00:36:28 +0100
commitfdbf073a86573c9ac4d595fac8e06d252ce1469f (patch)
treebd07908a9a8e18861545876c86f08ba43916d8a3 /llvm/lib/Transforms/Utils/Debugify.cpp
parent262158b8aa12634c17f4b37cba62564e5c9baab4 (diff)
downloadllvm-fdbf073a86573c9ac4d595fac8e06d252ce1469f.zip
llvm-fdbf073a86573c9ac4d595fac8e06d252ce1469f.tar.gz
llvm-fdbf073a86573c9ac4d595fac8e06d252ce1469f.tar.bz2
Revert "[DLCov] Implement DebugLoc coverage tracking (#107279)"
This reverts commit a9d93ecf1f8d2cfe3f77851e0df179b386cff353. Reverted due to the commit including a config in LLVM headers that is not available outside of the llvm source tree.
Diffstat (limited to 'llvm/lib/Transforms/Utils/Debugify.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Debugify.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp
index e5a7415..e6b5e26 100644
--- a/llvm/lib/Transforms/Utils/Debugify.cpp
+++ b/llvm/lib/Transforms/Utils/Debugify.cpp
@@ -290,16 +290,6 @@ bool llvm::stripDebugifyMetadata(Module &M) {
return Changed;
}
-bool hasLoc(const Instruction &I) {
- const DILocation *Loc = I.getDebugLoc().get();
-#if ENABLE_DEBUGLOC_COVERAGE_TRACKING
- DebugLocKind Kind = I.getDebugLoc().getKind();
- return Loc || Kind != DebugLocKind::Normal;
-#else
- return Loc;
-#endif
-}
-
bool llvm::collectDebugInfoMetadata(Module &M,
iterator_range<Module::iterator> Functions,
DebugInfoPerPass &DebugInfoBeforePass,
@@ -372,7 +362,9 @@ bool llvm::collectDebugInfoMetadata(Module &M,
LLVM_DEBUG(dbgs() << " Collecting info for inst: " << I << '\n');
DebugInfoBeforePass.InstToDelete.insert({&I, &I});
- DebugInfoBeforePass.DILocations.insert({&I, hasLoc(I)});
+ const DILocation *Loc = I.getDebugLoc().get();
+ bool HasLoc = Loc != nullptr;
+ DebugInfoBeforePass.DILocations.insert({&I, HasLoc});
}
}
}
@@ -615,7 +607,10 @@ bool llvm::checkDebugInfoMetadata(Module &M,
LLVM_DEBUG(dbgs() << " Collecting info for inst: " << I << '\n');
- DebugInfoAfterPass.DILocations.insert({&I, hasLoc(I)});
+ const DILocation *Loc = I.getDebugLoc().get();
+ bool HasLoc = Loc != nullptr;
+
+ DebugInfoAfterPass.DILocations.insert({&I, HasLoc});
}
}
}