mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We were accidentally forcing all members of a class to be instantiated in two places: - by trying to look up an existing destructor decl in the class, and - by adding the implicit destructor to the class, because addMember needlessly called loadAllMembers. Fix the former problem by adding a 'has destructor' bit to ClassDecl so we can track whether the implicit destructor needs to be added without querying its members. Fix the latter by making IterableDeclContext::addMember not call loadAllMembers, and making loadAllMembers not barf when it sees existing members in the context. Together with Jordan and JoeP's changes, this makes many interpreter tests now compile 3-20x faster. Swift SVN r17562
16 KiB
16 KiB