forked from OSchip/llvm-project
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:
parent
d692c1dbb7
commit
f762b72f35
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -40,3 +40,10 @@ int main() {
|
|||
};
|
||||
c();
|
||||
}
|
||||
|
||||
// rdar://12787751
|
||||
typedef char mds_path_t[1024];
|
||||
void directVolumePerfWaitForStoreState()
|
||||
{
|
||||
__block mds_path_t path;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue