Skip to content

Commit 1f87f60

Browse files
committed
Revert revert & fix distributed protocol and TBD handling
This reverts a revert that was done internally here https://stashweb.sd.apple.com/projects/DEVTOOLS/repos/swift/pull-requests/8697/overview and corrects some issues with the reverted code while at it. This fix is crucial to land for correctness and necessary to fix the rdar://144568615 which had a fix submitted however that assumed that THIS change also was present, so the fix submitted for 144568615 is incomplete without this change as well. This enables, and adds more TBD testing and was explicitly checked against the GameKit reproducer project from rdar://144568615. I will also upstream the necessary parts missing from OSS repo there so we have alignment between all branches.
1 parent 9a81152 commit 1f87f60

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

lib/IRGen/GenMeta.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ namespace {
10001000

10011001
// Emit the dispatch thunk.
10021002
auto shouldEmitDispatchThunk =
1003-
(Resilient || IGM.getOptions().WitnessMethodElimination);
1003+
Resilient || IGM.getOptions().WitnessMethodElimination;
10041004
if (shouldEmitDispatchThunk) {
10051005
IGM.emitDispatchThunk(func);
10061006
}

lib/IRGen/IRSymbolVisitor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class IRSymbolVisitorImpl : public SILSymbolVisitor {
108108

109109
void addDispatchThunk(SILDeclRef declRef) override {
110110
auto entity = LinkEntity::forDispatchThunk(declRef);
111+
111112
addLinkEntity(entity);
112113

113114
if (declRef.getAbstractFunctionDecl()->hasAsync())

test/TBD/distributed_library_evolution.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
// RUN: -validate-tbd-against-ir=all \
2323
// RUN: -emit-module-interface-path %t/Library.swiftinterface
2424

25-
// RUN: %target-swift-frontend %t/actor.swift \
26-
// RUN: -enable-library-evolution \
25+
// RUN: %target-swift-frontend %t/actor.swift -enable-library-evolution \
26+
// RUN: -enable-library-evolution \
2727
// RUN: -disable-availability-checking -emit-ir -o %t/test.ll -emit-tbd \
2828
// RUN: -emit-tbd-path %t/actor.tbd -I %t -tbd-install_name actor
2929

30-
// RUN: %target-swift-frontend %t/actor.swift \
31-
// RUN: -I %t \
32-
// RUN: -disable-availability-checking \
30+
// RUN: %target-swift-frontend %t/actor.swift \
31+
// RUN: -I %t \
32+
// RUN: -disable-availability-checking \
3333
// RUN: -emit-module \
3434
// RUN: -package-name Package \
3535
// RUN: -enable-library-evolution \

0 commit comments

Comments
 (0)