Skip to content

Commit ec0c748

Browse files
authored
Merge pull request #13883 from slavapestov/fix-test-32bit
IRGen: Fix protocol_resilience_thunks test on 32-bit
2 parents a70d67f + 4f1297d commit ec0c748

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ static bool isPolymorphic(const AbstractStorageDecl *storage) {
12751275
return true;
12761276
}
12771277

1278-
if (auto *protoDecl = dyn_cast<ProtocolDecl>(storage->getDeclContext()))
1278+
if (isa<ProtocolDecl>(storage->getDeclContext()))
12791279
return true;
12801280

12811281
return false;

lib/Demangling/NodePrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ NodePointer NodePrinter::print(NodePointer Node, bool asPrefixContext) {
10431043

10441044
print(Type);
10451045

1046-
if (auto isVariadic = getChildIf(Node, Node::Kind::VariadicMarker))
1046+
if (getChildIf(Node, Node::Kind::VariadicMarker))
10471047
Printer << "...";
10481048
return nullptr;
10491049
}

test/IRGen/protocol_resilience_thunks.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ public protocol MyResilientProtocol {
4747
// CHECK-NEXT: call swiftcc void [[FN]](%Any* noalias nocapture sret %0, %swift.opaque* noalias nocapture swiftself %1, %swift.type* %2, i8** %3)
4848
// CHECK-NEXT: ret void
4949

50-
// CHECK-LABEL: define{{( protected)?}} swiftcc void @"$S26protocol_resilience_thunks19MyResilientProtocolP12throwingFuncyyKFTj"(%swift.opaque* noalias nocapture swiftself, %swift.error** swifterror, %swift.type*, i8**)
50+
// CHECK-LABEL: define{{( protected)?}} swiftcc void @"$S26protocol_resilience_thunks19MyResilientProtocolP12throwingFuncyyKFTj"(%swift.opaque* noalias nocapture swiftself, %swift.error**{{( swifterror)?}}, %swift.type*, i8**)
5151
// CHECK: [[WITNESS_ADDR:%.*]] = getelementptr inbounds i8*, i8** %3, i32 3
5252
// CHECK-NEXT: [[WITNESS:%.*]] = load i8*, i8** [[WITNESS_ADDR]]
5353
// CHECK-NEXT: [[FN:%.*]] = bitcast i8* [[WITNESS]] to void (%swift.opaque*, %swift.error**, %swift.type*, i8**)*
54-
// CHECK-NEXT: call swiftcc void [[FN]](%swift.opaque* noalias nocapture swiftself %0, %swift.error** swifterror %1, %swift.type* %2, i8** %3)
54+
// CHECK-NEXT: call swiftcc void [[FN]](%swift.opaque* noalias nocapture swiftself %0, %swift.error**{{( swifterror)?}} %1, %swift.type* %2, i8** %3)
5555
// CHECK-NEXT: ret void
5656

5757
// CHECK-LABEL: define{{( protected)?}} swiftcc void @"$S26protocol_resilience_thunks19MyResilientProtocolP11genericFuncyqd__qd__lFTj"(%swift.opaque* noalias nocapture sret, %swift.opaque* noalias nocapture, %swift.type*, %swift.opaque* noalias nocapture swiftself, %swift.type*, i8**)

0 commit comments

Comments
 (0)