fix rdar://17405715 - lazy property crashes silgen of implicit memberwise initializer

The issue here is that SILGen is expecting the argument pattern for the
synthesized ConstructorDecl to line up with the stored property list for the
decl containing the constructor.  This is super fragile and probably the wrong
way to go (it would be better for sema to synthesize the entire ctor and make it
not be magical at all in silgen), but do a small fix to improve the situation
by inserting the lazy property storage next to the computed lazy property.



Swift SVN r19642
This commit is contained in:
Chris Lattner
2014-07-07 22:25:52 +00:00
parent 0cd01ee148
commit f693c5c83f
4 changed files with 35 additions and 10 deletions

View File

@@ -369,8 +369,9 @@ public:
/// Retrieve the set of members in this context.
DeclRange getMembers() const;
/// Add a member to this context.
void addMember(Decl *member);
/// Add a member to this context. If the hint decl is specified, the new decl
/// is inserted next to the hint.
void addMember(Decl *member, Decl *hint = nullptr);
/// Retrieve the lazy member loader.
LazyMemberLoader *getLoader() const {
@@ -401,7 +402,7 @@ private:
///
/// This is used internally when loading members, because loading a
/// member is an invisible addition.
void addMemberSilently(Decl *member) const;
void addMemberSilently(Decl *member, Decl *hint = nullptr) const;
};
} // end namespace swift