Skip to content

Commit 463b615

Browse files
authored
[Debug] Remove unnecessary DebugDescriptionMacro feature references (NFC) (#77738) (#77953)
The `DebugDescription` macro has been accepted. Additionally, the `DebugDescriptionMacro` feature was not providing conditional declaration as I originally intended. References to the feature are not needed and can be removed. (cherry-picked from #77738)
1 parent dd97862 commit 463b615

12 files changed

+11
-21
lines changed

Runtimes/Core/core/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ target_compile_options(swiftCore PRIVATE
284284
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature FreestandingMacros>"
285285
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature BitwiseCopyable>"
286286
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature Extern>"
287-
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature DebugDescriptionMacro>"
288287
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -group-info-path -Xfrontend ${CMAKE_CURRENT_SOURCE_DIR}/GroupInfo.json>"
289288
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -enable-experimental-concise-pound-file>"
290289
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -disable-autolinking-runtime-compatibility-concurrency>"

stdlib/public/core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ else()
331331
set(swift_lib_dir "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib")
332332
endif()
333333

334+
# For `@DebugDescription`.
334335
list(APPEND swift_stdlib_compile_flags "-plugin-path" "${swift_lib_dir}/swift/host/plugins")
335-
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "DebugDescriptionMacro")
336336

337337
set(swift_core_incorporate_object_libraries)
338338
list(APPEND swift_core_incorporate_object_libraries swiftRuntime)

stdlib/public/core/DebuggerSupport.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import SwiftShims
1414

1515
// Macros are disabled when Swift is built without swift-syntax.
16-
#if $Macros && $DebugDescriptionMacro && hasAttribute(attached)
16+
#if $Macros && hasAttribute(attached)
1717

1818
/// Converts description definitions to a debugger Type Summary.
1919
///

test/Macros/DebugDescription/dollar_handling.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// REQUIRES: swift_swift_parser
2-
// REQUIRES: swift_feature_DebugDescriptionMacro
32

43
// RUN: %empty-directory(%t)
5-
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
4+
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
65
// RUN: %FileCheck %s < %t/expansions-dump.txt
76

87
@DebugDescription

test/Macros/DebugDescription/explicit_self_property.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// REQUIRES: swift_swift_parser
2-
// REQUIRES: swift_feature_DebugDescriptionMacro
32

43
// RUN: %empty-directory(%t)
5-
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
4+
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
65
// RUN: %FileCheck %s < %t/expansions-dump.txt
76

87
@DebugDescription

test/Macros/DebugDescription/extension.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// REQUIRES: swift_swift_parser
2-
// REQUIRES: swift_feature_DebugDescriptionMacro
32

43
// RUN: %empty-directory(%t)
5-
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
4+
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
65
// RUN: %FileCheck %s < %t/expansions-dump.txt
76

87
struct MyStruct {}

test/Macros/DebugDescription/implicit_self_property.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// REQUIRES: swift_swift_parser
2-
// REQUIRES: swift_feature_DebugDescriptionMacro
32

43
// RUN: %empty-directory(%t)
5-
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
4+
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
65
// RUN: %FileCheck %s < %t/expansions-dump.txt
76

87
@DebugDescription

test/Macros/DebugDescription/linkage.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// REQUIRES: swift_swift_parser
2-
// REQUIRES: swift_feature_DebugDescriptionMacro
32

43
// RUN: %empty-directory(%t)
5-
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
4+
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
65
// RUN: %FileCheck %s < %t/expansions-dump.txt
76

87
@DebugDescription

test/Macros/DebugDescription/long_string.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// REQUIRES: swift_swift_parser
2-
// REQUIRES: swift_feature_DebugDescriptionMacro
32

43
// RUN: %empty-directory(%t)
5-
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
4+
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
65
// RUN: %FileCheck %s < %t/expansions-dump.txt
76

87
@DebugDescription

test/Macros/DebugDescription/property_chain.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// REQUIRES: swift_swift_parser
2-
// REQUIRES: swift_feature_DebugDescriptionMacro
32

43
// RUN: %empty-directory(%t)
5-
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
4+
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1
65
// RUN: %FileCheck %s < %t/expansions-dump.txt
76

87
@DebugDescription

0 commit comments

Comments
 (0)