Skip to content

Commit c5a368d

Browse files
SLTozerGeorgeARM
authored andcommitted
[DLCov] Move DebugLoc coverage macro to llvm-config.h (llvm#137787)
This patch follows the reversion of llvm#107279, which caused errors by including `llvm/Config/config.h` in a public header. In order to reapply that patch, this PR moves the definition of the config option to the `llvm-config.h` header instead, so that it can be used publicly. This patch also adds `LLVM_` as a prefix to the define, since it is now in a public header.
1 parent 43f260b commit c5a368d

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ endif()
199199
string(TOUPPER "${LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING}" uppercase_LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING)
200200

201201
if( uppercase_LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING STREQUAL "COVERAGE" )
202-
set( ENABLE_DEBUGLOC_COVERAGE_TRACKING 1 )
202+
set( LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING 1 )
203203
elseif( uppercase_LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING STREQUAL "DISABLED" OR NOT DEFINED LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING )
204204
# The DISABLED setting is default and requires no additional defines.
205205
else()

llvm/include/llvm/Config/config.h.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
/* Define to 1 to enable crash memory dumps, and to 0 otherwise. */
2020
#cmakedefine01 LLVM_ENABLE_CRASH_DUMPS
2121

22-
/* Define to 1 to enable expensive checks for debug location coverage checking,
23-
and to 0 otherwise. */
24-
#cmakedefine01 ENABLE_DEBUGLOC_COVERAGE_TRACKING
25-
2622
/* Define to 1 to prefer forward slashes on Windows, and to 0 prefer
2723
backslashes. */
2824
#cmakedefine01 LLVM_WINDOWS_PREFER_FORWARD_SLASH

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,8 @@
129129
/* Define if building LLVM with LLVM_ENABLE_TELEMETRY */
130130
#cmakedefine01 LLVM_ENABLE_TELEMETRY
131131

132+
/* Define to 1 to enable expensive checks for debug location coverage checking,
133+
and to 0 otherwise. */
134+
#cmakedefine01 LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING
135+
132136
#endif

llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ write_cmake_config("config") {
8484
values = [
8585
"BUG_REPORT_URL=https://github.com/llvm/llvm-project/issues/",
8686
"ENABLE_BACKTRACES=1",
87-
"ENABLE_DEBUGLOC_COVERAGE_TRACKING=",
87+
"LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING=",
8888
"ENABLE_CRASH_OVERRIDES=1",
8989
"BACKTRACE_HEADER=execinfo.h",
9090
"HAVE_BUILTIN_THREAD_POINTER=",

utils/bazel/llvm_configs/config.h.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
/* Define to 1 to enable crash memory dumps, and to 0 otherwise. */
2020
#cmakedefine01 LLVM_ENABLE_CRASH_DUMPS
2121

22-
/* Define to 1 to enable expensive checks for debug location coverage checking,
23-
and to 0 otherwise. */
24-
#cmakedefine01 ENABLE_DEBUGLOC_COVERAGE_TRACKING
25-
2622
/* Define to 1 to prefer forward slashes on Windows, and to 0 prefer
2723
backslashes. */
2824
#cmakedefine01 LLVM_WINDOWS_PREFER_FORWARD_SLASH

utils/bazel/llvm_configs/llvm-config.h.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,8 @@
129129
/* Define if building LLVM with LLVM_ENABLE_TELEMETRY */
130130
#cmakedefine01 LLVM_ENABLE_TELEMETRY
131131

132+
/* Define to 1 to enable expensive checks for debug location coverage checking,
133+
and to 0 otherwise. */
134+
#cmakedefine01 LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING
135+
132136
#endif

0 commit comments

Comments
 (0)