From fe90be09e320ec42b445d244fe770b87c6b4909e Mon Sep 17 00:00:00 2001 From: Arnold Schwaighofer Date: Fri, 7 Nov 2025 09:44:09 -0800 Subject: [PATCH 1/3] SE-0496 @inline(always) attribute was accepted Enable it per default --- include/swift/Basic/Features.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/Basic/Features.def b/include/swift/Basic/Features.def index 9721da54b3608..14ef931421449 100644 --- a/include/swift/Basic/Features.def +++ b/include/swift/Basic/Features.def @@ -536,7 +536,7 @@ EXPERIMENTAL_FEATURE(ImportMacroAliases, true) EXPERIMENTAL_FEATURE(BorrowAndMutateAccessors, false) /// Allow use of @inline(always) attribute -SUPPRESSIBLE_EXPERIMENTAL_FEATURE(InlineAlways, false) +SUPPRESSIBLE_LANGUAGE_FEATURE(InlineAlways, 496, "@inline(always) attribute") /// Allow use of 'Swift' (Swift runtime version) in @available attributes EXPERIMENTAL_FEATURE(SwiftRuntimeAvailability, true) From 9795f65145d1b00084081f2c5edfd18531220cc6 Mon Sep 17 00:00:00 2001 From: Arnold Schwaighofer Date: Fri, 7 Nov 2025 10:01:36 -0800 Subject: [PATCH 2/3] Change tests to also test that this feature is available per default --- test/ModuleInterface/attr-inline-always.swift | 8 +++----- test/SILGen/inline_always.swift | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/ModuleInterface/attr-inline-always.swift b/test/ModuleInterface/attr-inline-always.swift index c5d24654b780c..768a15a49079c 100644 --- a/test/ModuleInterface/attr-inline-always.swift +++ b/test/ModuleInterface/attr-inline-always.swift @@ -1,11 +1,9 @@ // RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name attrs \ -// RUN: -enable-experimental-feature InlineAlways \ // RUN: -emit-private-module-interface-path %t.private.swiftinterface -// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name attrs \ -// RUN: -enable-experimental-feature InlineAlways -// RUN: %target-swift-typecheck-module-from-interface(%t.private.swiftinterface) -module-name attrs \ -// RUN: -enable-experimental-feature InlineAlways +// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name attrs + +// RUN: %target-swift-typecheck-module-from-interface(%t.private.swiftinterface) -module-name attrs // RUN: %FileCheck %s --check-prefixes CHECK --input-file %t.swiftinterface // RUN: %FileCheck %s --check-prefixes CHECK --input-file %t.private.swiftinterface diff --git a/test/SILGen/inline_always.swift b/test/SILGen/inline_always.swift index 9fa11c0573cf4..6e420d2106e7e 100644 --- a/test/SILGen/inline_always.swift +++ b/test/SILGen/inline_always.swift @@ -1,4 +1,5 @@ // RUN: %target-swift-emit-silgen -enable-experimental-feature InlineAlways -parse-as-library %s | %FileCheck %s +// RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s // REQUIRES: swift_feature_InlineAlways From 91991bfd47df070e598ddc208d801abc73f77891 Mon Sep 17 00:00:00 2001 From: Arnold Schwaighofer Date: Fri, 7 Nov 2025 10:46:33 -0800 Subject: [PATCH 3/3] Silence Misc/verify-swift-feature-testing.test-sh failure --- test/ModuleInterface/attr-inline-always.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/ModuleInterface/attr-inline-always.swift b/test/ModuleInterface/attr-inline-always.swift index 768a15a49079c..9fc3522c7c7bd 100644 --- a/test/ModuleInterface/attr-inline-always.swift +++ b/test/ModuleInterface/attr-inline-always.swift @@ -1,3 +1,14 @@ +// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name attrs \ +// RUN: -enable-experimental-feature InlineAlways \ +// RUN: -emit-private-module-interface-path %t.private.swiftinterface + +// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name attrs + +// RUN: %target-swift-typecheck-module-from-interface(%t.private.swiftinterface) -module-name attrs + +// RUN: %FileCheck %s --check-prefixes CHECK --input-file %t.swiftinterface +// RUN: %FileCheck %s --check-prefixes CHECK --input-file %t.private.swiftinterface + // RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name attrs \ // RUN: -emit-private-module-interface-path %t.private.swiftinterface