Skip to content

Commit 9717961

Browse files
committed
AST: Promote BuiltinAllocVector feature to baseline.
1 parent ab99cac commit 9717961

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

include/swift/Basic/Features.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ BASELINE_LANGUAGE_FEATURE(BuiltinCreateAsyncTaskWithExecutor, 0, "Task create bu
158158
BASELINE_LANGUAGE_FEATURE(BuiltinCreateAsyncDiscardingTaskInGroupWithExecutor, 0, "Task create in discarding task group with extra executor preference")
159159
BASELINE_LANGUAGE_FEATURE(BuiltinStackAlloc, 0, "Builtin.stackAlloc")
160160
BASELINE_LANGUAGE_FEATURE(BuiltinUnprotectedStackAlloc, 0, "Builtin.unprotectedStackAlloc")
161-
LANGUAGE_FEATURE(BuiltinAllocVector, 0, "Builtin.allocVector")
161+
BASELINE_LANGUAGE_FEATURE(BuiltinAllocVector, 0, "Builtin.allocVector")
162162
BASELINE_LANGUAGE_FEATURE(BuiltinTaskRunInline, 0, "Builtin.taskRunInline")
163163
BASELINE_LANGUAGE_FEATURE(BuiltinUnprotectedAddressOf, 0, "Builtin.unprotectedAddressOf")
164164
LANGUAGE_FEATURE(NewCxxMethodSafetyHeuristics, 0, "Only import C++ methods that return pointers (projections) on owned types as unsafe")

lib/AST/FeatureSet.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ static bool usesFeatureRethrowsProtocol(Decl *decl) {
124124
return usesFeatureRethrowsProtocol(decl, checked);
125125
}
126126

127-
UNINTERESTING_FEATURE(BuiltinAllocVector)
128-
129127
static bool usesFeatureNewCxxMethodSafetyHeuristics(Decl *decl) {
130128
return decl->hasClangNode();
131129
}

stdlib/public/core/Builtin.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,9 +1102,5 @@ func _getGlobalStringTablePointer(_ constant: String) -> UnsafePointer<CChar> {
11021102
@_alwaysEmitIntoClient
11031103
public
11041104
func _allocateVector<Element>(elementType: Element.Type, capacity: Int) -> UnsafeMutablePointer<Element> {
1105-
#if $BuiltinAllocVector
11061105
return UnsafeMutablePointer(Builtin.allocVector(elementType, capacity._builtinWordValue))
1107-
#else
1108-
fatalError("unsupported compiler")
1109-
#endif
11101106
}

0 commit comments

Comments
 (0)