зеркало из https://github.com/microsoft/clang-1.git
Objective-c++ IR gen.
Flag synthesized struct decl. as non-empty so CXX side of ir gen does not skip its Null initialization. Fixes radar 8027844 for objc++'s collection statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
9f716e4140
Коммит
38c9ab880b
|
@ -2856,6 +2856,9 @@ QualType ASTContext::getObjCFastEnumerationStateType() {
|
|||
Field->setAccess(AS_public);
|
||||
ObjCFastEnumerationStateTypeDecl->addDecl(Field);
|
||||
}
|
||||
if (getLangOptions().CPlusPlus)
|
||||
if (CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(ObjCFastEnumerationStateTypeDecl))
|
||||
CXXRD->setEmpty(false);
|
||||
|
||||
ObjCFastEnumerationStateTypeDecl->completeDefinition();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
|
||||
// rdar: // 8027844
|
||||
|
||||
// CHECK: call void @llvm.memset
|
||||
|
||||
int main() {
|
||||
id foo;
|
||||
for (id a in foo) {
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче