Skip to content

Commit 75bfa44

Browse files
authored
[android][test] Fix five tests that are failing on the community Android CI (#69189)
Update the Android doc with info about the latest LTS NDK not working.
1 parent d1979bb commit 75bfa44

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

docs/Android.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ To follow along with this guide, you'll need:
3636
instructions in the Swift project README.
3737
2. The latest build of the Swift compiler for your Linux distro, available at
3838
https://www.swift.org/download/ or sometimes your distro package manager.
39-
3. The latest version of the Android LTS NDK (r25c at the time of this writing),
40-
available to download here:
39+
3. The last version of the Android LTS NDK (r25c, the latest LTS NDK 26 at the
40+
time of this writing doesn't work yet), available to download here:
4141
https://developer.android.com/ndk/downloads
4242
4. An Android device with remote debugging enabled or the emulator. We require
4343
remote debugging in order to deploy built stdlib products to the device. You

test/AutoDiff/SILOptimizer/vjp_and_pullback_inlining.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// REQUIRES: swift_in_compiler
77

88
import _Differentiation
9-
#if os(Linux)
9+
#if canImport(Glibc)
1010
import Glibc
1111
#else
1212
import Foundation

test/IRGen/abitypes_arm.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ class Foo {
1111
}
1212
}
1313

14-
// armv7: define internal void @makeOne(ptr noalias sret({{.*}}) align 4 %agg.result, float %f, float %s)
14+
// armv7: define internal void @makeOne(ptr noalias sret({{.*}}) align 4 %agg.result, float{{( noundef)?}} %f, float{{( noundef)?}} %s)
1515
// armv7s: define internal void @makeOne(ptr noalias sret({{.*}}) align 4 %agg.result, float %f, float %s)
1616
// armv7k: define internal %struct.One @makeOne(float {{.*}}%f, float {{.*}}%s)

test/Interop/Cxx/class/constructors-irgen-android.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Constructors
99
import TypeClassification
1010

1111
public func createHasVirtualBase() -> HasVirtualBase {
12-
// ITANIUM_ARM: define protected swiftcc void @"$s7MySwift20createHasVirtualBaseSo0deF0VyF"(ptr noalias nocapture sret({{.*}}) %0)
12+
// ITANIUM_ARM: define protected swiftcc void @"$s7MySwift20createHasVirtualBaseSo0deF0VyF"(ptr noalias sret({{.*}}) %0)
1313
// To verify that the thunk is inlined, make sure there's no intervening
1414
// `define`, i.e. the call to the C++ constructor happens in
1515
// createHasVirtualBase(), not some later function.

test/Interop/Cxx/templates/class-template-non-type-parameter-irgen.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ import ClassTemplateNonTypeParameter
55
let p = MagicIntPair()
66
let t = MagicIntTriple()
77

8-
// CHECK: @"${{s4main1pSo0042MagicArrayCInt_CUnsignedLong_2_DFABlHknrCcVvp|s4main1pSo0047MagicArrayCInt_CUnsignedLongLong_2_ofBJmlmartjdVvp}}"
9-
// CHECK: @"${{s4main1tSo0042MagicArrayCInt_CUnsignedLong_3_DFABlHknrCcVvp|s4main1tSo0047MagicArrayCInt_CUnsignedLongLong_3_ofBJmlmartjdVvp}}"
8+
// CHECK: @"${{s4main1pSo0042MagicArrayCInt_CUnsignedLong_2_DFABlHknrCcVvp|s4main1pSo0047MagicArrayCInt_CUnsignedLongLong_2_ofBJmlmartjdVvp|s4main1pSo0041MagicArrayCInt_CUnsignedInt_2_yDFGkvkBqzcVvp}}"
9+
// CHECK: @"${{s4main1tSo0042MagicArrayCInt_CUnsignedLong_3_DFABlHknrCcVvp|s4main1tSo0047MagicArrayCInt_CUnsignedLongLong_3_ofBJmlmartjdVvp|s4main1tSo0041MagicArrayCInt_CUnsignedInt_3_yDFGkvkBqzcVvp}}"

test/SILOptimizer/character_literals.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,33 @@ public func charArray(_ i: Int) -> [Character] {
1919

2020
// NOTE: 97 = 'a'
2121
// NOTE: -2233785415175766016 = 0xE1 = 0xE0 (ASCII discrim) | 0x01 (count)
22+
// NOTE: On Android AArch64, this is shifted right by one byte: 0x00E1 = 63331869759897600
2223
//
2324
// CHECK-LABEL: define {{.*}}singleChar
2425
// CHECK-NEXT: entry:
25-
// CHECK-NEXT: ret { i64, ptr } { i64 97, ptr inttoptr (i64 -2233785415175766016 to ptr) }
26+
// CHECK-NEXT: ret { i64, ptr } { i64 97, ptr inttoptr (i64 {{-2233785415175766016|63331869759897600}} to ptr) }
2627
public func singleChar() -> Character {
2728
return "a"
2829
}
2930

3031
// NOTE: 10852326 = 0xE6 0x97 0xA5 (little endian), the encoding of U+65E5
3132
// NOTE: -6701356245527298048 = 0xA3 = 0xA0 (non-ASCII discrim) | 0x03 (count)
33+
// NOTE: On Android AArch64, this is shifted right by one byte: 0x00A3 = 45880421203836928
3234
//
3335
// CHECK-LABEL: define {{.*}}singleNonAsciiChar
3436
// CHECK-NEXT: entry:
35-
// CHECK-NEXT: ret { i64, ptr } { i64 10852326, ptr inttoptr (i64 -6701356245527298048 to ptr) }
37+
// CHECK-NEXT: ret { i64, ptr } { i64 10852326, ptr inttoptr (i64 {{-6701356245527298048|45880421203836928}} to ptr) }
3638
public func singleNonAsciiChar() -> Character {
3739
return ""
3840
}
3941

4042
// NOTE: -9223372036854775808 = 0x80 = immortal large discrim
43+
// NOTE: On Android AArch64, this is shifted right by one byte: 0x0080 = 36028797018963968
4144
// NOTE: 1152921504606847001 = 25 (code unit length) | `isTailAllocated` perf flag
4245
//
4346
// CHECK-LABEL: define {{.*}}singleNonSmolChar
4447
// CHECK-NEXT: entry:
45-
// CHECK: ret { i64, ptr } { i64 1152921504606847001, ptr {{.*}}@".str.25.\F0\9F\91\A9\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A6\E2\80\8D\F0\9F\91\A6" {{.*}}i64 -9223372036854775808
48+
// CHECK: ret { i64, ptr } { i64 1152921504606847001, ptr {{.*}}@".str.25.\F0\9F\91\A9\E2\80\8D\F0\9F\91\A9\E2\80\8D\F0\9F\91\A6\E2\80\8D\F0\9F\91\A6" {{.*}}i64 {{-9223372036854775808|36028797018963968}}
4649
public func singleNonSmolChar() -> Character {
4750
return "👩‍👩‍👦‍👦"
4851
}

0 commit comments

Comments
 (0)