Skip to content

Commit 5c42e56

Browse files
authored
Merge branch 'main' into wip-distributed-fixes
2 parents 5eaef53 + d49dd18 commit 5c42e56

File tree

319 files changed

+4636
-1447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

319 files changed

+4636
-1447
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@
286286

287287
# utils
288288
/utils/*windows* @compnerd
289+
/utils/build.ps1 @compnerd
289290
/utils/build_swift/ @etcwilde @justice-adams-apple @shahmishal
290291
/utils/generate-xcode @hamishknight
291292
/utils/gyb_sourcekit_support/ @bnbarham @hamishknight @rintaro

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,8 @@ set(SWIFT_COMPILER_VERSION "" CACHE STRING
336336
"The internal version of the Swift compiler")
337337
set(CLANG_COMPILER_VERSION "" CACHE STRING
338338
"The internal version of the Clang compiler")
339+
set(SWIFT_TOOLCHAIN_VERSION "" CACHE STRING
340+
"The Swift compiler tag")
339341

340342
option(SWIFT_DISABLE_DEAD_STRIPPING
341343
"Turn off Darwin-specific dead stripping for Swift host tools." FALSE)

README.md

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,20 @@
55

66
# Swift Programming Language
77

8-
9-
| | **Architecture** | **Build** |
10-
|---|:---:|:---:|
11-
| **macOS** | Universal |[![Build Status](https://ci.swift.org/job/oss-swift-package-macos/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-macos)|
12-
| **Ubuntu 20.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04)|
13-
| **Ubuntu 20.04** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64)|
14-
| **Ubuntu 22.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04)|
15-
| **Ubuntu 22.04** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04-aarch64)|
16-
| **Ubuntu 24.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04)|
17-
| **Ubuntu 24.04** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04-aarch64)|
18-
| **Amazon Linux 2** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2)|
19-
| **Amazon Linux 2** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64)|
20-
| **Universal Base Image 9** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubi-9/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubi-9)|
21-
| **Debian 12** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-debian-12/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-debian-12)|
22-
| **Debian 12** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-debian-12-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-debian-12-aarch64)|
23-
| **Windows 10** | x86_64 |[![Build Status](https://ci-external.swift.org/job/swift-main-windows-toolchain/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/swift-main-windows-toolchain)|
24-
| **Windows 10** | ARM64 |[![Build Status](https://ci-external.swift.org/job/swift-main-windows-toolchain-arm64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/swift-main-windows-toolchain-arm64)|
25-
26-
**Cross-Compilation Targets**
27-
28-
| **Target** | **Build** |
29-
|:---:|:---:|
30-
| **wasm32-unknown-wasi** |[![Build Status](https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04)|
31-
32-
**Swift Community-Hosted CI Platforms**
33-
34-
| **OS** | **Architecture** | **Build** |
35-
|---|:---:|:---:|
36-
|**[Android](https://github.com/swiftlang/swift-community-hosted-continuous-integration/blob/main/nodes/x86_64_ubuntu_24_04_android.json)** | X86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build)|
37-
|**[Android](https://github.com/swiftlang/swift-community-hosted-continuous-integration/blob/main/nodes/aarch64_ubuntu_24_04_android.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64)|
38-
|**[Windows 2019 (VS 2019)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/main/nodes/x86_64_windows_2019_VS2019.json)** | x86_64 | [![Build Status](https://ci-external.swift.org/job/oss-swift-windows-x86_64-vs2019/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-windows-x86_64-vs2019)|
8+
| **OS** | **Status** |
9+
|---:|:---:|
10+
| macOS | [![macOS Universal Build Status](https://ci.swift.org/job/oss-swift-package-macos/lastCompletedBuild/badge/icon?subject=universal)](https://ci.swift.org/job/oss-swift-package-macos)|
11+
| Ubuntu 20.04 | [![Ubuntu 20.04 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04) [![Ubuntu 20.04 aarch64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64)|
12+
| Ubuntu 22.04 | [![Ubuntu 22.04 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04) [![Ubuntu 22.04 aarch64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04-aarch64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04-aarch64)|
13+
| Ubuntu 24.04 | [![Ubuntu 24.04 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04) [![Ubuntu 24.04 aarch64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04-aarch64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04-aarch64)|
14+
| Amazon Linux 2 | [![Amazon Linux 2 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2) [![Amazon Linux 2 aarch64 Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64)|
15+
| Debian 12 | [![Debian 12 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-debian-12/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-debian-12) [![Debian 12 aarch64 Build Status](https://ci.swift.org/job/oss-swift-package-debian-12-aarch64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci.swift.org/job/oss-swift-package-debian-12-aarch64)|
16+
| Windows 10 | [![Windows 10 x86_64 Build Status](https://ci-external.swift.org/job/swift-main-windows-toolchain/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci-external.swift.org/job/swift-main-windows-toolchain) [![Windows 10 arm64 Build Status](https://ci-external.swift.org/job/swift-main-windows-toolchain-arm64/lastCompletedBuild/badge/icon?subject=arm64)](https://ci-external.swift.org/job/swift-main-windows-toolchain-arm64)|
17+
| Universal Base Image 9 | [![Universal Base Image 9 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-ubi-9/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-ubi-9)|
18+
|**Cross-Compilation Targets**||
19+
| wasm32-unknown-wasi |[![wasm32-unknown-wasi Build Status](https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04)|
20+
|**Community-Hosted CI Platforms**||
21+
|[Android](https://github.com/swiftlang/swift-community-hosted-continuous-integration/blob/main/nodes/x86_64_ubuntu_24_04_android.json) | [![Android x86_64 Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build) [![Android aarch64 Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64)|
3922

4023
## Welcome to Swift
4124

Runtimes/Supplemental/Synchronization/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,20 @@ add_compile_options(
6363
$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>
6464
$<$<COMPILE_LANGUAGE:Swift>:-enable-builtin-module>
6565
$<$<COMPILE_LANGUAGE:Swift>:-strict-memory-safety>
66+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature NoncopyableGenerics2>"
67+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SuppressedAssociatedTypes>"
68+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SE427NoInferenceOnExtension>"
69+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature NonescapableTypes>"
70+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature LifetimeDependence>"
71+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature InoutLifetimeDependence>"
72+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature LifetimeDependenceMutableAccessors>"
73+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-upcoming-feature MemberImportVisibility>"
6674
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature RawLayout>"
6775
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature StaticExclusiveOnly>"
6876
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature Extern>"
77+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -enforce-exclusivity=unchecked>"
78+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -target-min-inlining-version -Xfrontend min>"
79+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -enable-lexical-lifetimes=false>"
6980
"$<$<AND:$<BOOL:${${PROJECT_NAME}_ENABLE_LIBRARY_EVOLUTION}>,$<COMPILE_LANGUAGE:Swift>>:-enable-library-evolution>"
7081
"$<$<AND:$<BOOL:${${PROJECT_NAME}_ENABLE_PRESPECIALIZATION}>,$<COMPILE_LANGUAGE:Swift>>:SHELL:-Xfrontend -prespecialize-generic-metadata>")
7182

SwiftCompilerSources/Sources/AST/Declarations.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ public class NominalTypeDecl: GenericTypeDecl {
5858
}
5959
}
6060

61-
final public class EnumDecl: NominalTypeDecl {}
61+
final public class EnumDecl: NominalTypeDecl {
62+
public var hasRawType: Bool { bridged.Enum_hasRawType() }
63+
}
6264

6365
final public class StructDecl: NominalTypeDecl {
6466
public var hasUnreferenceableStorage: Bool { bridged.Struct_hasUnreferenceableStorage() }

SwiftCompilerSources/Sources/Basic/Utils.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,15 @@ public extension NoReflectionChildren {
7979
// StringRef
8080
//===----------------------------------------------------------------------===//
8181

82-
public struct StringRef : CustomStringConvertible, NoReflectionChildren {
82+
public struct StringRef : CustomStringConvertible, NoReflectionChildren, ExpressibleByStringLiteral {
8383
public let _bridged: BridgedStringRef
8484

8585
public init(bridged: BridgedStringRef) { self._bridged = bridged }
8686

87+
public init(stringLiteral: StaticString) {
88+
self._bridged = BridgedStringRef(data: stringLiteral.utf8Start, count: stringLiteral.utf8CodeUnitCount)
89+
}
90+
8791
public var string: String { String(_bridged) }
8892
public var description: String { string }
8993

SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LifetimeDependenceInsertion.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,11 @@ struct VariableIntroducerUseDefWalker : LifetimeDependenceUseDefValueWalker, Lif
413413
}
414414

415415
mutating func introducer(_ value: Value, _ owner: Value?) -> WalkResult {
416+
if let addrToPtr = value as? AddressToPointerInst {
417+
// AddressToPointer introduces the value dependence. To handle Builtin.addressOfBorrow, follow the address that
418+
// the pointer is derived from.
419+
return walkUp(address: addrToPtr.address)
420+
}
416421
return visitorClosure(value)
417422
}
418423

SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyApply.swift

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ extension ApplyInst : OnoneSimplifiable, SILCombineSimplifiable {
2828
if tryRemoveArrayCast(apply: self, context) {
2929
return
3030
}
31+
if tryOptimizeEnumComparison(apply: self, context) {
32+
return
33+
}
3134
if !context.preserveDebugInfo {
3235
_ = tryReplaceExistentialArchetype(of: self, context)
3336
}
@@ -110,6 +113,49 @@ private func tryRemoveArrayCast(apply: ApplyInst, _ context: SimplifyContext) ->
110113
return true
111114
}
112115

116+
/// Optimize (the very inefficient) RawRepresentable comparison to a simple compare of enum tags.
117+
/// For example,
118+
/// ```
119+
/// enum E: String {
120+
/// case a, b, c
121+
/// }
122+
/// ```
123+
/// is compared by getting the raw values of both operands and doing a string compare.
124+
/// This peephole optimizations replaces the call to such a comparison function with a direct compare of
125+
/// the enum tags, which boils down to a single integer comparison instruction.
126+
///
127+
private func tryOptimizeEnumComparison(apply: ApplyInst, _ context: SimplifyContext) -> Bool {
128+
guard let callee = apply.referencedFunction,
129+
apply.arguments.count == 2,
130+
callee.hasSemanticsAttribute("rawrepresentable.is_equal"),
131+
apply.type.isStruct
132+
else {
133+
return false
134+
}
135+
let lhs = apply.arguments[0]
136+
let rhs = apply.arguments[1]
137+
guard let enumDecl = lhs.type.nominal as? EnumDecl,
138+
enumDecl.hasRawType,
139+
!enumDecl.isResilient(in: apply.parentFunction),
140+
!enumDecl.hasClangNode,
141+
lhs.type.isAddress,
142+
lhs.type == rhs.type
143+
else {
144+
return false
145+
}
146+
let builder = Builder(before: apply, context)
147+
let tagType = context.getBuiltinIntegerType(bitWidth: 32)
148+
let lhsTag = builder.createBuiltin(name: "getEnumTag", type: tagType,
149+
substitutions: apply.substitutionMap, arguments: [lhs])
150+
let rhsTag = builder.createBuiltin(name: "getEnumTag", type: tagType,
151+
substitutions: apply.substitutionMap, arguments: [rhs])
152+
let builtinBoolType = context.getBuiltinIntegerType(bitWidth: 1)
153+
let cmp = builder.createBuiltin(name: "cmp_eq_Int32", type: builtinBoolType, arguments: [lhsTag, rhsTag])
154+
let booleanResult = builder.createStruct(type: apply.type, elements: [cmp])
155+
apply.replace(with: booleanResult, context)
156+
return true
157+
}
158+
113159
/// If the apply uses an existential archetype (`@opened("...")`) and the concrete type is known,
114160
/// replace the existential archetype with the concrete type
115161
/// 1. in the apply's substitution map

SwiftCompilerSources/Sources/SIL/Argument.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,15 @@ public struct ArgumentConventions : Collection, CustomStringConvertible {
285285
if let paramIdx = parameterIndex(for: argumentIndex) {
286286
return convention.parameters[paramIdx].convention
287287
}
288-
let resultInfo = convention.indirectSILResults[argumentIndex]
288+
let resultInfo = convention.indirectSILResult(at: argumentIndex)
289289
return ArgumentConvention(result: resultInfo.convention)
290290
}
291291

292292
public subscript(result argumentIndex: Int) -> ResultInfo? {
293293
if parameterIndex(for: argumentIndex) != nil {
294294
return nil
295295
}
296-
return convention.indirectSILResults[argumentIndex]
296+
return convention.indirectSILResult(at: argumentIndex)
297297
}
298298

299299
public subscript(parameter argumentIndex: Int) -> ParameterInfo? {

SwiftCompilerSources/Sources/SIL/FunctionConvention.swift

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@ public struct FunctionConvention : CustomStringConvertible {
5757
: SILFunctionType_getNumPackResults(functionType.bridged)
5858
}
5959

60-
/// Indirect results including the error.
61-
public var indirectSILResults: LazyFilterSequence<Results> {
62-
hasLoweredAddresses
63-
? results.lazy.filter { $0.isSILIndirect }
64-
: results.lazy.filter { $0.convention == .pack }
60+
/// Returns the indirect result - including the error - at `index`.
61+
public func indirectSILResult(at index: Int) -> ResultInfo {
62+
let indirectResults = results.lazy.filter {
63+
hasLoweredAddresses ? $0.isSILIndirect : $0.convention == .pack
64+
}
65+
// Note that subscripting a LazyFilterCollection (with the base index, e.g. `Int`) does not work
66+
// as expected, because it returns the nth element of the base collection!
67+
// Therefore we need to implement the subscript "manually".
68+
return indirectResults.enumerated().first{ $0.offset == index }!.element
6569
}
6670

6771
public var parameters: Parameters {

include/swift/ABI/Metadata.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2787,11 +2787,22 @@ using ResilientWitnessesHeader = TargetResilientWitnessesHeader<InProcess>;
27872787
/// global actor protocol.
27882788
template<typename Runtime>
27892789
struct TargetGlobalActorReference {
2790+
private:
2791+
using SignedDescriptorPointer =
2792+
const TargetProtocolConformanceDescriptor<Runtime>
2793+
*__ptrauth_swift_protocol_conformance_descriptor;
2794+
2795+
public:
27902796
/// The type of the global actor.
27912797
RelativeDirectPointer<const char, /*nullable*/ false> type;
27922798

27932799
/// The conformance of the global actor to the GlobalActor protocol.
2794-
TargetRelativeProtocolConformanceDescriptorPointer<Runtime> conformance;
2800+
RelativeIndirectablePointer<
2801+
const TargetProtocolConformanceDescriptor<Runtime>,
2802+
/*nullable*/ false,
2803+
/*offset*/ int32_t,
2804+
/*indirect type*/ SignedDescriptorPointer>
2805+
conformance;
27952806
};
27962807

27972808
/// Describes the context of a protocol conformance that is relevant when

include/swift/AST/ASTBridging.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ struct BridgedDeclObj {
402402
BRIDGED_INLINE bool GenericType_isGenericAtAnyLevel() const;
403403
BRIDGED_INLINE bool NominalType_isGlobalActor() const;
404404
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE OptionalBridgedDeclObj NominalType_getValueTypeDestructor() const;
405+
BRIDGED_INLINE bool Enum_hasRawType() const;
405406
BRIDGED_INLINE bool Struct_hasUnreferenceableStorage() const;
406407
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedASTType Class_getSuperclass() const;
407408
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedDeclObj Class_getDestructor() const;
@@ -1396,6 +1397,15 @@ BridgedSpecializeAttr BridgedSpecializeAttr_createParsed(
13961397
BridgedDeclNameRef cTargetFunction, BridgedArrayRef cSPIGroups,
13971398
BridgedArrayRef cAvailableAttrs);
13981399

1400+
SWIFT_NAME("BridgedSpecializedAttr.createParsed(_:atLoc:range:whereClause:"
1401+
"exported:kind:taretFunction:spiGroups:availableAttrs:)")
1402+
BridgedSpecializedAttr BridgedSpecializedAttr_createParsed(
1403+
BridgedASTContext cContext, BridgedSourceLoc cAtLoc,
1404+
BridgedSourceRange cRange, BridgedNullableTrailingWhereClause cWhereClause,
1405+
bool exported, BridgedSpecializationKind cKind,
1406+
BridgedDeclNameRef cTargetFunction, BridgedArrayRef cSPIGroups,
1407+
BridgedArrayRef cAvailableAttrs);
1408+
13991409
SWIFT_NAME(
14001410
"BridgedSPIAccessControlAttr.createParsed(_:atLoc:range:spiGroupName:)")
14011411
BridgedSPIAccessControlAttr BridgedSPIAccessControlAttr_createParsed(

include/swift/AST/ASTBridgingImpl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ OptionalBridgedDeclObj BridgedDeclObj::NominalType_getValueTypeDestructor() cons
221221
return {getAs<swift::NominalTypeDecl>()->getValueTypeDestructor()};
222222
}
223223

224+
bool BridgedDeclObj::Enum_hasRawType() const {
225+
return getAs<swift::EnumDecl>()->hasRawType();
226+
}
227+
224228
bool BridgedDeclObj::Struct_hasUnreferenceableStorage() const {
225229
return getAs<swift::StructDecl>()->hasUnreferenceableStorage();
226230
}

0 commit comments

Comments
 (0)