mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[thunk-lowering] Add a pass that performs lowering of ThunkInsts.
Right now it just handles the "identity" case so we can validate the functionality.
This commit is contained in:
@@ -940,6 +940,26 @@ void SILModule::performOnceForPrespecializedImportedExtensions(
|
||||
prespecializedFunctionDeclsImported = true;
|
||||
}
|
||||
|
||||
void SILModule::moveBefore(SILModule::iterator moveAfter, SILFunction *fn) {
|
||||
assert(&fn->getModule() == this);
|
||||
assert(&moveAfter->getModule() == this);
|
||||
assert(moveAfter != end() &&
|
||||
"We assume that moveAfter must not be end since nothing is after end");
|
||||
|
||||
getFunctionList().remove(fn->getIterator());
|
||||
getFunctionList().insert(moveAfter, fn);
|
||||
}
|
||||
|
||||
void SILModule::moveAfter(SILModule::iterator moveAfter, SILFunction *fn) {
|
||||
assert(&fn->getModule() == this);
|
||||
assert(&moveAfter->getModule() == this);
|
||||
assert(moveAfter != end() &&
|
||||
"We assume that moveAfter must not be end since nothing is after end");
|
||||
|
||||
getFunctionList().remove(fn->getIterator());
|
||||
getFunctionList().insertAfter(moveAfter, fn);
|
||||
}
|
||||
|
||||
SILProperty *
|
||||
SILProperty::create(SILModule &M, unsigned Serialized, AbstractStorageDecl *Decl,
|
||||
std::optional<KeyPathPatternComponent> Component) {
|
||||
|
||||
Reference in New Issue
Block a user