File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,10 @@ function(_add_target_variant_swift_compile_flags
300300 if (SWIFT_STDLIB_ENABLE_UNICODE_DATA)
301301 list (APPEND result "-D" "SWIFT_STDLIB_ENABLE_UNICODE_DATA" )
302302 endif ()
303+
304+ if (SWIFT_STDLIB_ENABLE_VECTOR_TYPES)
305+ list (APPEND result "-D" "SWIFT_STDLIB_ENABLE_VECTOR_TYPES" )
306+ endif ()
303307
304308 if (SWIFT_STDLIB_HAS_COMMANDLINE)
305309 list (APPEND result "-D" "SWIFT_STDLIB_HAS_COMMANDLINE" )
Original file line number Diff line number Diff line change @@ -520,6 +520,7 @@ extension _StringGuts {
520520
521521extension String . UTF16View {
522522
523+ #if SWIFT_STDLIB_ENABLE_VECTOR_TYPES
523524 @inline ( __always)
524525 internal func _utf16Length< U: SIMD , S: SIMD > (
525526 readPtr: inout UnsafeRawPointer ,
@@ -551,6 +552,7 @@ extension String.UTF16View {
551552
552553 return utf16Count
553554 }
555+ #endif
554556
555557 @inline ( __always)
556558 internal func _utf16Distance( from start: Index , to end: Index ) -> Int {
@@ -576,6 +578,7 @@ extension String.UTF16View {
576578 readPtr += 1
577579 }
578580
581+ #if SWIFT_STDLIB_ENABLE_VECTOR_TYPES
579582 // TODO: Currently, using SIMD sizes above SIMD8 is slower
580583 // Once that's fixed we should go up to SIMD64 here
581584
@@ -605,6 +608,7 @@ extension String.UTF16View {
605608 return 0
606609 }
607610 }
611+ #endif
608612
609613 //trailing bytes
610614 while readPtr < endPtr {
You can’t perform that action at this time.
0 commit comments