@@ -108,17 +108,16 @@ SILFunction::create(SILModule &M, SILLinkage linkage, StringRef name,
108108 // Resurrect a zombie function.
109109 // This happens for example if a specialized function gets dead and gets
110110 // deleted. And afterwards the same specialization is created again.
111- fn->init (linkage, name, loweredType, genericEnv, loc, isBareSILFunction ,
112- isTrans, isSerialized, entryCount, isThunk, classSubclassScope,
111+ fn->init (linkage, name, loweredType, genericEnv, isBareSILFunction, isTrans ,
112+ isSerialized, entryCount, isThunk, classSubclassScope,
113113 inlineStrategy, E, debugScope, isDynamic, isExactSelfClass,
114114 isDistributed);
115115 assert (fn->empty ());
116116 } else {
117- fn = new (M) SILFunction (M, linkage, name, loweredType, genericEnv, loc,
118- isBareSILFunction, isTrans, isSerialized,
119- entryCount, isThunk, classSubclassScope,
120- inlineStrategy, E, debugScope,
121- isDynamic, isExactSelfClass, isDistributed);
117+ fn = new (M) SILFunction (
118+ M, linkage, name, loweredType, genericEnv, isBareSILFunction, isTrans,
119+ isSerialized, entryCount, isThunk, classSubclassScope, inlineStrategy,
120+ E, debugScope, isDynamic, isExactSelfClass, isDistributed);
122121 }
123122 if (entry) entry->setValue (fn);
124123
@@ -138,44 +137,36 @@ static FunctionParseFn parseFunction = nullptr;
138137static FunctionCopyEffectsFn copyEffectsFunction = nullptr ;
139138static FunctionGetEffectFlagsFn getEffectFlagsFunction = nullptr ;
140139
141- SILFunction::SILFunction (SILModule &Module, SILLinkage Linkage, StringRef Name,
142- CanSILFunctionType LoweredType,
143- GenericEnvironment *genericEnv,
144- Optional<SILLocation> Loc, IsBare_t isBareSILFunction,
145- IsTransparent_t isTrans, IsSerialized_t isSerialized,
146- ProfileCounter entryCount, IsThunk_t isThunk,
147- SubclassScope classSubclassScope,
148- Inline_t inlineStrategy, EffectsKind E,
149- const SILDebugScope *DebugScope,
150- IsDynamicallyReplaceable_t isDynamic,
151- IsExactSelfClass_t isExactSelfClass,
152- IsDistributed_t isDistributed)
140+ SILFunction::SILFunction (
141+ SILModule &Module, SILLinkage Linkage, StringRef Name,
142+ CanSILFunctionType LoweredType, GenericEnvironment *genericEnv,
143+ IsBare_t isBareSILFunction, IsTransparent_t isTrans,
144+ IsSerialized_t isSerialized, ProfileCounter entryCount, IsThunk_t isThunk,
145+ SubclassScope classSubclassScope, Inline_t inlineStrategy, EffectsKind E,
146+ const SILDebugScope *DebugScope, IsDynamicallyReplaceable_t isDynamic,
147+ IsExactSelfClass_t isExactSelfClass, IsDistributed_t isDistributed)
153148 : SwiftObjectHeader(functionMetatype), Module(Module),
154149 index(Module.getNewFunctionIndex()),
155150 Availability(AvailabilityContext::alwaysAvailable()) {
156- init (Linkage, Name, LoweredType, genericEnv, Loc, isBareSILFunction, isTrans,
157- isSerialized, entryCount, isThunk, classSubclassScope, inlineStrategy,
158- E, DebugScope, isDynamic, isExactSelfClass, isDistributed);
159-
151+ init (Linkage, Name, LoweredType, genericEnv, isBareSILFunction, isTrans,
152+ isSerialized, entryCount, isThunk, classSubclassScope, inlineStrategy, E,
153+ DebugScope, isDynamic, isExactSelfClass, isDistributed);
154+
160155 // Set our BB list to have this function as its parent. This enables us to
161156 // splice efficiently basic blocks in between functions.
162157 BlockList.Parent = this ;
163158 if (initFunction)
164159 initFunction ({this }, &libswiftSpecificData, sizeof (libswiftSpecificData));
165160}
166161
167- void SILFunction::init (SILLinkage Linkage, StringRef Name,
168- CanSILFunctionType LoweredType,
169- GenericEnvironment *genericEnv,
170- Optional<SILLocation> Loc, IsBare_t isBareSILFunction,
171- IsTransparent_t isTrans, IsSerialized_t isSerialized,
172- ProfileCounter entryCount, IsThunk_t isThunk,
173- SubclassScope classSubclassScope,
174- Inline_t inlineStrategy, EffectsKind E,
175- const SILDebugScope *DebugScope,
176- IsDynamicallyReplaceable_t isDynamic,
177- IsExactSelfClass_t isExactSelfClass,
178- IsDistributed_t isDistributed) {
162+ void SILFunction::init (
163+ SILLinkage Linkage, StringRef Name, CanSILFunctionType LoweredType,
164+ GenericEnvironment *genericEnv, IsBare_t isBareSILFunction,
165+ IsTransparent_t isTrans, IsSerialized_t isSerialized,
166+ ProfileCounter entryCount, IsThunk_t isThunk,
167+ SubclassScope classSubclassScope, Inline_t inlineStrategy, EffectsKind E,
168+ const SILDebugScope *DebugScope, IsDynamicallyReplaceable_t isDynamic,
169+ IsExactSelfClass_t isExactSelfClass, IsDistributed_t isDistributed) {
179170 setName (Name);
180171 this ->LoweredType = LoweredType;
181172 this ->GenericEnv = genericEnv;
@@ -244,12 +235,12 @@ void SILFunction::createSnapshot(int id) {
244235 assert (id != 0 && " invalid snapshot ID" );
245236 assert (!getSnapshot (id) && " duplicate snapshot" );
246237
247- SILFunction *newSnapshot = new (Module) SILFunction (Module,
248- getLinkage (), getName (), getLoweredFunctionType (), getGenericEnvironment (),
249- getLocation (), isBare (), isTransparent (), isSerialized (),
250- getEntryCount (), isThunk (), getClassSubclassScope (),
251- getInlineStrategy (), getEffectsKind (), getDebugScope (),
252- isDynamicallyReplaceable (), isExactSelfClass (), isDistributed ());
238+ SILFunction *newSnapshot = new (Module) SILFunction (
239+ Module, getLinkage (), getName (), getLoweredFunctionType (),
240+ getGenericEnvironment (), isBare (), isTransparent (), isSerialized (),
241+ getEntryCount (), isThunk (), getClassSubclassScope (), getInlineStrategy (),
242+ getEffectsKind (), getDebugScope (), isDynamicallyReplaceable (),
243+ isExactSelfClass (), isDistributed ());
253244
254245 // Copy all relevant properties.
255246 // TODO: It's really unfortunate that this needs to be done manually. It would
0 commit comments