[llvm-branch-commits] [cfe-branch] r105022 - in /cfe/branches/Apple/whitney: lib/AST/ASTContext.cpp test/CodeGenObjCXX/foreach-statement.mm
Daniel Dunbar
daniel at zuster.org
Fri May 28 16:06:01 PDT 2010
Author: ddunbar
Date: Fri May 28 18:06:01 2010
New Revision: 105022
URL: http://llvm.org/viewvc/llvm-project?rev=105022&view=rev
Log:
Merge r104837:
--
Author: Fariborz Jahanian <fjahanian at apple.com>
Date: Thu May 27 16:05:06 2010 +0000
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.
Added:
cfe/branches/Apple/whitney/test/CodeGenObjCXX/foreach-statement.mm
Modified:
cfe/branches/Apple/whitney/lib/AST/ASTContext.cpp
Modified: cfe/branches/Apple/whitney/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/AST/ASTContext.cpp?rev=105022&r1=105021&r2=105022&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/AST/ASTContext.cpp (original)
+++ cfe/branches/Apple/whitney/lib/AST/ASTContext.cpp Fri May 28 18:06:01 2010
@@ -2856,6 +2856,9 @@
Field->setAccess(AS_public);
ObjCFastEnumerationStateTypeDecl->addDecl(Field);
}
+ if (getLangOptions().CPlusPlus)
+ if (CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(ObjCFastEnumerationStateTypeDecl))
+ CXXRD->setEmpty(false);
ObjCFastEnumerationStateTypeDecl->completeDefinition();
}
Added: cfe/branches/Apple/whitney/test/CodeGenObjCXX/foreach-statement.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/CodeGenObjCXX/foreach-statement.mm?rev=105022&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/CodeGenObjCXX/foreach-statement.mm (added)
+++ cfe/branches/Apple/whitney/test/CodeGenObjCXX/foreach-statement.mm Fri May 28 18:06:01 2010
@@ -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) {
+ }
+}
More information about the llvm-branch-commits
mailing list