https://github.com/SLTozer created 
https://github.com/llvm/llvm-project/pull/146521

In a previous commit, the llvm-config-defined macro 
LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING was renamed to 
LLVM_ENABLE_DEBUGLOC_TRACKING_COVERAGE. One instance of this in Clang remains 
unchanged; this patch renames it, and adds an explicit llvm-config inclusion to 
ensure the define doesn't silently get removed.

NFC outside of coverage tracking builds, which we do not currently test.

>From 49ca072ffbdb13c498f4b962378a0023e39285b0 Mon Sep 17 00:00:00 2001
From: Stephen Tozer <stephen.to...@sony.com>
Date: Tue, 1 Jul 2025 10:56:28 +0100
Subject: [PATCH] [Clang][DLCov] Fix debugloc coverage tracking macro in Clang

In a previous commit, the llvm-config-defined macro
LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING was renamed to
LLVM_ENABLE_DEBUGLOC_TRACKING_COVERAGE. One instance of this in Clang
remains unchanged; this patch renames it, and adds an explicit llvm-config
inclusion to ensure it doesn't silently get removed.

NFC outside of coverage tracking builds, which we currently do not have
tests for.
---
 clang/lib/CodeGen/BackendUtil.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/lib/CodeGen/BackendUtil.cpp 
b/clang/lib/CodeGen/BackendUtil.cpp
index 1c92ea45c7458..2f6d4c414e737 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -25,6 +25,7 @@
 #include "llvm/Bitcode/BitcodeWriter.h"
 #include "llvm/Bitcode/BitcodeWriterPass.h"
 #include "llvm/CodeGen/TargetSubtargetInfo.h"
+#include "llvm/Config/llvm-config.h"
 #include "llvm/Frontend/Driver/CodeGenOptions.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/DebugInfo.h"
@@ -961,7 +962,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
           CodeGenOpts.DIBugsReportFilePath);
     Debugify.registerCallbacks(PIC, MAM);
 
-#if LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING
+#if LLVM_ENABLE_DEBUGLOC_TRACKING_COVERAGE
     // If we're using debug location coverage tracking, mark all the
     // instructions coming out of the frontend without a DebugLoc as being
     // compiler-generated, to prevent both those instructions and new

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to