objective-C blocks: Check for record type when deciding if

byref variable requires extended layout info. to prevent 
a crash involving arrays declared __block. // rdar://12787751

llvm-svn: 169908
This commit is contained in:
Fariborz Jahanian 2012-12-11 19:58:01 +00:00
parent d692c1dbb7
commit f762b72f35
2 changed files with 8 additions and 1 deletions

View File

@ -4413,7 +4413,7 @@ bool ASTContext::getByrefLifetime(QualType Ty,
return false;
HasByrefExtendedLayout = false;
if (Ty->isAggregateType()) {
if (Ty->isRecordType()) {
HasByrefExtendedLayout = true;
LifeTime = Qualifiers::OCL_None;
}

View File

@ -40,3 +40,10 @@ int main() {
};
c();
}
// rdar://12787751
typedef char mds_path_t[1024];
void directVolumePerfWaitForStoreState()
{
__block mds_path_t path;
}