File tree Expand file tree Collapse file tree 8 files changed +13
-15
lines changed
FunctionSignatureTransforms Expand file tree Collapse file tree 8 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ namespace swift {
3636// / subclasses. Used to break a circular dependency from SIL <=>
3737// / SILOptimizer that would be caused by us needing to use
3838// / SILOptFunctionBuilder here.
39- template <typename ImplClass, typename FunctionBuilderTy >
39+ template <typename ImplClass>
4040class TypeSubstCloner : public SILClonerWithScopes <ImplClass> {
4141 friend class SILInstructionVisitor <ImplClass>;
4242 friend class SILCloner <ImplClass>;
@@ -386,6 +386,7 @@ class TypeSubstCloner : public SILClonerWithScopes<ImplClass> {
386386 // / necessary when inlining said function into a new generic context.
387387 // / \param SubsMap - the substitutions of the inlining/specialization process.
388388 // / \param RemappedSig - the generic signature.
389+ template <typename FunctionBuilderTy>
389390 static SILFunction *remapParentFunction (FunctionBuilderTy &FuncBuilder,
390391 SILModule &M,
391392 SILFunction *ParentFunction,
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ inline void createEntryArguments(SILFunction *f) {
286286
287287// / Cloner that remaps types using the target function's generic environment.
288288class BasicTypeSubstCloner final
289- : public TypeSubstCloner<BasicTypeSubstCloner, SILOptFunctionBuilder > {
289+ : public TypeSubstCloner<BasicTypeSubstCloner> {
290290
291291 static SubstitutionMap getSubstitutionMap (SILFunction *target) {
292292 if (auto *targetGenEnv = target->getGenericEnvironment ())
Original file line number Diff line number Diff line change 3030namespace swift {
3131
3232class GenericCloner
33- : public TypeSubstCloner<GenericCloner, SILOptFunctionBuilder > {
34- using SuperTy = TypeSubstCloner<GenericCloner, SILOptFunctionBuilder >;
33+ : public TypeSubstCloner<GenericCloner> {
34+ using SuperTy = TypeSubstCloner<GenericCloner>;
3535
3636 SILOptFunctionBuilder &FuncBuilder;
3737 SerializedKind_t Serialized;
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ namespace swift {
4242namespace autodiff {
4343
4444class JVPCloner ::Implementation final
45- : public TypeSubstCloner<JVPCloner::Implementation, SILOptFunctionBuilder > {
45+ : public TypeSubstCloner<JVPCloner::Implementation> {
4646private:
4747 // / The global context.
4848 ADContext &context;
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ namespace swift {
4141namespace autodiff {
4242
4343class VJPCloner ::Implementation final
44- : public TypeSubstCloner<VJPCloner::Implementation, SILOptFunctionBuilder > {
44+ : public TypeSubstCloner<VJPCloner::Implementation> {
4545 friend class VJPCloner ;
4646 friend class PullbackCloner ;
4747
Original file line number Diff line number Diff line change @@ -43,10 +43,8 @@ using llvm::SmallVectorImpl;
4343// / Create a SILCloner for Existential Specilizer.
4444namespace {
4545class ExistentialSpecializerCloner
46- : public TypeSubstCloner<ExistentialSpecializerCloner,
47- SILOptFunctionBuilder> {
48- using SuperTy =
49- TypeSubstCloner<ExistentialSpecializerCloner, SILOptFunctionBuilder>;
46+ : public TypeSubstCloner<ExistentialSpecializerCloner> {
47+ using SuperTy = TypeSubstCloner<ExistentialSpecializerCloner>;
5048 friend class SILInstructionVisitor <ExistentialSpecializerCloner>;
5149 friend class SILCloner <ExistentialSpecializerCloner>;
5250
Original file line number Diff line number Diff line change @@ -113,9 +113,8 @@ namespace {
113113// / caller, so the cloned function will have a mix of locations from different
114114// / functions.
115115class CapturePropagationCloner
116- : public TypeSubstCloner<CapturePropagationCloner, SILOptFunctionBuilder> {
117- using SuperTy =
118- TypeSubstCloner<CapturePropagationCloner, SILOptFunctionBuilder>;
116+ : public TypeSubstCloner<CapturePropagationCloner> {
117+ using SuperTy = TypeSubstCloner<CapturePropagationCloner>;
119118 friend class SILInstructionVisitor <CapturePropagationCloner>;
120119 friend class SILCloner <CapturePropagationCloner>;
121120
Original file line number Diff line number Diff line change @@ -307,10 +307,10 @@ class BeginApplySite {
307307
308308namespace swift {
309309class SILInlineCloner
310- : public TypeSubstCloner<SILInlineCloner, SILOptFunctionBuilder > {
310+ : public TypeSubstCloner<SILInlineCloner> {
311311 friend class SILInstructionVisitor <SILInlineCloner>;
312312 friend class SILCloner <SILInlineCloner>;
313- using SuperTy = TypeSubstCloner<SILInlineCloner, SILOptFunctionBuilder >;
313+ using SuperTy = TypeSubstCloner<SILInlineCloner>;
314314 using InlineKind = SILInliner::InlineKind;
315315
316316 SILOptFunctionBuilder &FuncBuilder;
You can’t perform that action at this time.
0 commit comments