diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-31 22:24:06 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-31 22:24:06 +0000 |
commit | 97d744bea4e539b526fa78d0878fbc5e352003ca (patch) | |
tree | 99dc3f43127dc8d3dc1be91f9f3a3f62f53e5d54 /clang/lib/Sema/SemaObjCProperty.cpp | |
parent | e1995f25667c1cc2ef50ed266f64e58c473c06dc (diff) | |
download | bcm5719-llvm-97d744bea4e539b526fa78d0878fbc5e352003ca.tar.gz bcm5719-llvm-97d744bea4e539b526fa78d0878fbc5e352003ca.zip |
objective-c: this patch (re)introduces objective-c's default property
synthesis. This new feature is currently placed under
-fobjc-default-synthesize-properties option
and is off by default pending further testing.
It will become the default feature soon.
// rdar://8843851
llvm-svn: 138913
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index f4743acec50..84052fd9d83 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -1289,6 +1289,16 @@ void Sema::DefaultSynthesizeProperties (Scope *S, ObjCImplDecl* IMPDecl, } } +void Sema::DefaultSynthesizeProperties(Scope *S, Decl *D) { + if (!LangOpts.ObjCDefaultSynthProperties || !LangOpts.ObjCNonFragileABI2) + return; + ObjCImplementationDecl *IC=dyn_cast_or_null<ObjCImplementationDecl>(D); + if (!IC) + return; + if (ObjCInterfaceDecl* IDecl = IC->getClassInterface()) + DefaultSynthesizeProperties(S, IC, IDecl); +} + void Sema::DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl, ObjCContainerDecl *CDecl, const llvm::DenseSet<Selector>& InsMap) { |