@@ -874,10 +874,8 @@ class SILFunction
874874 void setLinkage (SILLinkage linkage) { Linkage = unsigned (linkage); }
875875
876876// / Checks if this (callee) function body can be inlined into the caller
877- // / by comparing their SerializedKind_t values.
877+ // / by comparing their ` SerializedKind_t` values.
878878// /
879- // / If the \p assumeFragileCaller is true, the caller must be serialized,
880- // / in which case the callee needs to be serialized also to be inlined.
881879// / If both callee and caller are `not_serialized`, the callee can be inlined
882880// / into the caller during SIL inlining passes even if it (and the caller)
883881// / might contain private symbols. If this callee is `serialized_for_pkg`,
@@ -894,21 +892,13 @@ class SILFunction
894892// / ```
895893// /
896894// / \p callerSerializedKind The caller's SerializedKind.
897- // / \p assumeFragileCaller True if the call site of this function already
898- // / knows that the caller is serialized.
899- bool canBeInlinedIntoCaller (
900- std::optional<SerializedKind_t> callerSerializedKind = std::nullopt ,
901- bool assumeFragileCaller = true ) const ;
895+ bool canBeInlinedIntoCaller (SerializedKind_t callerSerializedKind) const ;
902896
903897 // / Returns true if this function can be referenced from a fragile function
904898 // / body.
905899 // / \p callerSerializedKind The caller's SerializedKind. Used to be passed to
906900 // / \c canBeInlinedIntoCaller.
907- // / \p assumeFragileCaller Default to true since this function must be called
908- // if the caller is [serialized].
909- bool hasValidLinkageForFragileRef (
910- std::optional<SerializedKind_t> callerSerializedKind = std::nullopt ,
911- bool assumeFragileCaller = true ) const ;
901+ bool hasValidLinkageForFragileRef (SerializedKind_t callerSerializedKind) const ;
912902
913903 // / Get's the effective linkage which is used to derive the llvm linkage.
914904 // / Usually this is the same as getLinkage(), except in one case: if this
@@ -1165,11 +1155,9 @@ class SILFunction
11651155 bool isSerialized () const {
11661156 return SerializedKind_t (SerializedKind) == IsSerialized;
11671157 }
1168- bool isSerializedForPackage () const {
1169- return SerializedKind_t (SerializedKind) == IsSerializedForPackage;
1170- }
1171- bool isNotSerialized () const {
1172- return SerializedKind_t (SerializedKind) == IsNotSerialized;
1158+ bool isAnySerialized () const {
1159+ return SerializedKind_t (SerializedKind) == IsSerialized ||
1160+ SerializedKind_t (SerializedKind) == IsSerializedForPackage;
11731161 }
11741162
11751163 // / Get this function's serialized attribute.
0 commit comments