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
300
300
if (SWIFT_STDLIB_ENABLE_UNICODE_DATA )
301
301
list (APPEND result "-D" "SWIFT_STDLIB_ENABLE_UNICODE_DATA" )
302
302
endif ()
303
+
304
+ if (SWIFT_STDLIB_ENABLE_VECTOR_TYPES )
305
+ list (APPEND result "-D" "SWIFT_STDLIB_ENABLE_VECTOR_TYPES" )
306
+ endif ()
303
307
304
308
if (SWIFT_STDLIB_HAS_COMMANDLINE )
305
309
list (APPEND result "-D" "SWIFT_STDLIB_HAS_COMMANDLINE" )
Original file line number Diff line number Diff line change @@ -520,6 +520,7 @@ extension _StringGuts {
520
520
521
521
extension String . UTF16View {
522
522
523
+ #if SWIFT_STDLIB_ENABLE_VECTOR_TYPES
523
524
@inline ( __always)
524
525
internal func _utf16Length< U: SIMD , S: SIMD > (
525
526
readPtr: inout UnsafeRawPointer ,
@@ -551,6 +552,7 @@ extension String.UTF16View {
551
552
552
553
return utf16Count
553
554
}
555
+ #endif
554
556
555
557
@inline ( __always)
556
558
internal func _utf16Distance( from start: Index , to end: Index ) -> Int {
@@ -576,6 +578,7 @@ extension String.UTF16View {
576
578
readPtr += 1
577
579
}
578
580
581
+ #if SWIFT_STDLIB_ENABLE_VECTOR_TYPES
579
582
// TODO: Currently, using SIMD sizes above SIMD8 is slower
580
583
// Once that's fixed we should go up to SIMD64 here
581
584
@@ -605,6 +608,7 @@ extension String.UTF16View {
605
608
return 0
606
609
}
607
610
}
611
+ #endif
608
612
609
613
//trailing bytes
610
614
while readPtr < endPtr {
You can’t perform that action at this time.
0 commit comments