diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-08-23 18:51:39 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-08-23 18:51:39 +0000 |
commit | 000835d0b04345c0014c603fe6339b3bc154050e (patch) | |
tree | 9dd5de000a642519690c5a94dc84a822c8d65965 /lib/AST/DeclObjC.cpp | |
parent | e5848d680c8abc5c76f37b7149b349603db94ce0 (diff) |
Support for IRGen of synthesize bitfield ivars in
objc-nonfragile-abi2 (radar 7824380).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111823 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 4167841838..28c7a49a13 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -604,10 +604,17 @@ ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, ObjCContainerDecl *DC, // decl contexts, the previously built IvarList must be rebuilt. ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(DC); if (!ID) { - if (ObjCImplementationDecl *IM = dyn_cast<ObjCImplementationDecl>(DC)) + if (ObjCImplementationDecl *IM = dyn_cast<ObjCImplementationDecl>(DC)) { ID = IM->getClassInterface(); - else - ID = (cast<ObjCCategoryDecl>(DC))->getClassInterface(); + if (BW) + IM->setHasSynthBitfield(true); + } + else { + ObjCCategoryDecl *CD = cast<ObjCCategoryDecl>(DC); + ID = CD->getClassInterface(); + if (BW) + CD->setHasSynthBitfield(true); + } } ID->setIvarList(0); } |