mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL: remove the SILOpenedArchetypesTracker
Instead, put the archetype->instrution map into SIlModule. SILOpenedArchetypesTracker tried to maintain and reconstruct the mapping locally, e.g. during a use of SILBuilder. Having a "global" map in SILModule makes the whole logic _much_ simpler. I'm wondering why we didn't do this in the first place. This requires that opened archetypes must be unique in a module - which makes sense. This was the case anyway, except for keypath accessors (which I fixed in the previous commit) and in some sil test files.
This commit is contained in:
@@ -91,8 +91,7 @@ static bool isTargetTooNew(const llvm::Triple &moduleTarget,
|
||||
}
|
||||
|
||||
ModuleFile::ModuleFile(std::shared_ptr<const ModuleFileSharedCore> core)
|
||||
: Core(core),
|
||||
DeserializedTypeCallback([](Type ty) {}) {
|
||||
: Core(core) {
|
||||
assert(!core->hasError());
|
||||
|
||||
DeclTypeCursor = core->DeclTypeCursor;
|
||||
|
||||
Reference in New Issue
Block a user