File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
test/SILOptimizer/Inputs/cross-module Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,9 @@ bool CrossModuleOptimization::canSerializeFunction(
207
207
// Do the same check for the specializations of such functions.
208
208
if (function->isSpecialization ()) {
209
209
const SILFunction *parent = function->getSpecializationInfo ()->getParent ();
210
- if (!parent->getSpecializeAttrs ().empty ())
210
+ // Don't serialize exported (public) specializations.
211
+ if (!parent->getSpecializeAttrs ().empty () &&
212
+ function->getLinkage () == SILLinkage::Public)
211
213
return false ;
212
214
}
213
215
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ public struct Container {
17
17
var arr = Array < Base > ( )
18
18
arr. append ( Base ( ) )
19
19
print ( arr)
20
+ dontBlockSerialization ( arr)
20
21
return t
21
22
}
22
23
Original file line number Diff line number Diff line change @@ -10,3 +10,9 @@ public func genericSubmoduleFunc<T>(_ t: T) {
10
10
printit ( t)
11
11
}
12
12
13
+ @_specialize ( exported: true , where T == Int)
14
+ @inlinable
15
+ @inline ( never)
16
+ public func dontBlockSerialization< T> ( _ t: T ) {
17
+ print ( t)
18
+ }
You can’t perform that action at this time.
0 commit comments