File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
lib/SILOptimizer/Analysis Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ bool CalleeList::allCalleesVisible() {
34
34
// Do not consider functions in other modules (libraries) because of library
35
35
// evolution: such function may behave differently in future/past versions
36
36
// of the library.
37
- if (Callee->isAvailableExternally ())
37
+ // TODO: exclude functions which are deserialized from modules in the same
38
+ // resilience domain.
39
+ if (Callee->isAvailableExternally () &&
40
+ // shared_external functions are always emitted in the client.
41
+ Callee->getLinkage () != SILLinkage::SharedExternal)
38
42
return false ;
39
43
}
40
44
return true ;
Original file line number Diff line number Diff line change @@ -506,3 +506,19 @@ bb0:
506
506
return %r : $()
507
507
}
508
508
509
+ sil shared_external @shared_external_func : $@convention(thin) () -> () {
510
+ bb0:
511
+ %r = tuple ()
512
+ return %r : $()
513
+ }
514
+
515
+ // CHECK-LABEL: sil @call_shared_external_func
516
+ // CHECK-NEXT: <func=>
517
+ sil @call_shared_external_func : $@convention(thin) () -> () {
518
+ bb0:
519
+ %u = function_ref @shared_external_func : $@convention(thin) () -> ()
520
+ %a = apply %u() : $@convention(thin) () -> ()
521
+ %r = tuple ()
522
+ return %r : $()
523
+ }
524
+
You can’t perform that action at this time.
0 commit comments