Skip to content

Commit d7cc984

Browse files
authored
Merge pull request swiftlang#23422 from davezarzycki/silence_silopt_warning
2 parents 1bec714 + e9c655f commit d7cc984

File tree

1 file changed

+30
-29
lines changed

1 file changed

+30
-29
lines changed

lib/SILOptimizer/Utils/Generics.cpp

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2497,38 +2497,39 @@ static bool linkSpecialization(SILModule &M, SILFunction *F) {
24972497
return false;
24982498
}
24992499

2500-
/// The list of classes and functions from the stdlib
2501-
/// whose specializations we want to preserve.
2502-
static const char *const KnownPrespecializations[] = {
2503-
"Array",
2504-
"_ArrayBuffer",
2505-
"_ContiguousArrayBuffer",
2506-
"Range",
2507-
"RangeIterator",
2508-
"CountableRange",
2509-
"CountableRangeIterator",
2510-
"ClosedRange",
2511-
"ClosedRangeIterator",
2512-
"CountableClosedRange",
2513-
"CountableClosedRangeIterator",
2514-
"IndexingIterator",
2515-
"Collection",
2516-
"ReversedCollection",
2517-
"MutableCollection",
2518-
"BidirectionalCollection",
2519-
"RandomAccessCollection",
2520-
"ReversedRandomAccessCollection",
2521-
"RangeReplaceableCollection",
2522-
"_allocateUninitializedArray",
2523-
"UTF8",
2524-
"UTF16",
2525-
"String",
2526-
"_StringBuffer",
2527-
};
2528-
25292500
bool swift::isKnownPrespecialization(StringRef SpecName) {
25302501
// Completely disable for now.
25312502
#if false
2503+
2504+
/// The list of classes and functions from the stdlib
2505+
/// whose specializations we want to preserve.
2506+
static const char *const KnownPrespecializations[] = {
2507+
"Array",
2508+
"_ArrayBuffer",
2509+
"_ContiguousArrayBuffer",
2510+
"Range",
2511+
"RangeIterator",
2512+
"CountableRange",
2513+
"CountableRangeIterator",
2514+
"ClosedRange",
2515+
"ClosedRangeIterator",
2516+
"CountableClosedRange",
2517+
"CountableClosedRangeIterator",
2518+
"IndexingIterator",
2519+
"Collection",
2520+
"ReversedCollection",
2521+
"MutableCollection",
2522+
"BidirectionalCollection",
2523+
"RandomAccessCollection",
2524+
"ReversedRandomAccessCollection",
2525+
"RangeReplaceableCollection",
2526+
"_allocateUninitializedArray",
2527+
"UTF8",
2528+
"UTF16",
2529+
"String",
2530+
"_StringBuffer",
2531+
};
2532+
25322533
// TODO: Once there is an efficient API to check if
25332534
// a given symbol is a specialization of a specific type,
25342535
// use it instead. Doing demangling just for this check

0 commit comments

Comments
 (0)