Fix <rdar://problem/15858869> *all* objc accessors disabled in init methods, not just for self

This patch: 
 - Changes sema to set the "IsDirectPropertyAccess" on MemberRefExprs
   in inits/destructors that should be done directly because they are
   on the local object.
 - Removes the "SGF.AlwaysDirectStoredPropertyAccess" bool in SILGen,
   which was the source of the problem above and was otherwise problematic.

This will get a bit simpler when -enable-new-objc-properties rolls out. 


Swift SVN r12967
This commit is contained in:
Chris Lattner
2014-01-26 07:23:42 +00:00
parent 0dfb1ec790
commit ddc5ca81d6
6 changed files with 30 additions and 35 deletions

View File

@@ -34,8 +34,7 @@ SILGenFunction::SILGenFunction(SILGenModule &SGM, SILFunction &F)
: SGM(SGM), F(F), LastInsnWithoutScope(0),
B(createBasicBlock(), &InsertedInstrs),
ReturnDest(CleanupLocation::getCleanupLocation(F.getLocation())),
NeedsReturn(false), AlwaysDirectStoredPropertyAccess(false),
CurrentSILLoc(F.getLocation()), Cleanups(*this)
NeedsReturn(false), CurrentSILLoc(F.getLocation()), Cleanups(*this)
{
}