@@ -140,24 +140,6 @@ private func _createAvailabilityTraitExpr(
140
140
}
141
141
}
142
142
143
- /// Create an expression that contains a test trait for symbols that are
144
- /// unavailable in Embedded Swift.
145
- ///
146
- /// - Parameters:
147
- /// - attribute: The `@_unavailableInEmbedded` attribute.
148
- /// - context: The macro context in which the expression is being parsed.
149
- ///
150
- /// - Returns: An instance of `ExprSyntax` representing an instance of
151
- /// ``Trait`` that can be used to prevent a test from running in Embedded
152
- /// Swift.
153
- private func _createNoEmbeddedAvailabilityTraitExpr(
154
- from attribute: AttributeSyntax ,
155
- in context: some MacroExpansionContext
156
- ) -> ExprSyntax {
157
- let sourceLocationExpr = createSourceLocationExpr ( of: attribute, context: context)
158
- return " .__unavailableInEmbedded(sourceLocation: \( sourceLocationExpr) ) "
159
- }
160
-
161
143
/// Create an expression that contains test traits for availability (i.e.
162
144
/// `.enabled(if: ...)`).
163
145
///
@@ -187,8 +169,9 @@ func createAvailabilityTraitExprs(
187
169
_createAvailabilityTraitExpr ( from: availability, when: . obsoleted, in: context)
188
170
}
189
171
190
- if let noembeddedAttribute = decl. noembeddedAttribute {
191
- result += [ _createNoEmbeddedAvailabilityTraitExpr ( from: noembeddedAttribute, in: context) ]
172
+ if let attribute = decl. unavailableInEmbeddedAttribute {
173
+ let sourceLocationExpr = createSourceLocationExpr ( of: attribute, context: context)
174
+ result += [ " .__unavailableInEmbedded(sourceLocation: \( sourceLocationExpr) ) " ]
192
175
}
193
176
194
177
return result
@@ -313,7 +296,7 @@ func createSyntaxNode(
313
296
}
314
297
315
298
// Handle Embedded Swift.
316
- if decl. noembeddedAttribute != nil {
299
+ if decl. unavailableInEmbeddedAttribute != nil {
317
300
result = """
318
301
#if !hasFeature(Embedded)
319
302
\( result)
0 commit comments