[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)
J. Ryan Stinnett via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 03:40:29 PDT 2024
================
@@ -22,6 +23,67 @@ namespace llvm {
class LLVMContext;
class raw_ostream;
class DILocation;
+ class Function;
+
+#if ENABLE_DEBUGLOC_COVERAGE_TRACKING
+ // Used to represent different "kinds" of DebugLoc, expressing that a DebugLoc
+ // is either ordinary, containing a valid DILocation, or otherwise describing
+ // the reason why the DebugLoc does not contain a valid DILocation.
+ enum class DebugLocKind : uint8_t {
+ // DebugLoc is expected to contain a valid DILocation.
+ Normal,
+ // DebugLoc intentionally does not have a valid DILocation; may be for a
+ // compiler-generated instruction, or an explicitly dropped location.
+ LineZero,
----------------
jryans wrote:
Looking at it another way, I suppose my point is `LineZero` doesn't convey whether it's on purpose, an accident, or some undetermined mix of the two. But really, this case is trying to capture cases where explicit choices were made, so the name should reflect that somehow.
https://github.com/llvm/llvm-project/pull/107279
More information about the llvm-commits
mailing list