diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-12-18 23:09:57 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-12-18 23:09:57 +0000 |
commit | 1ba0a8ed202412605157d6af05c41859fdef699c (patch) | |
tree | 04bf185f4c6433060964ccbca936d73a50eb213d /lib/Sema/SemaObjCProperty.cpp | |
parent | ee698e84c17bf0fb97f5d8c8f4061125c749715e (diff) |
ObjectiveC. support "section" attribute on properties
and methods. rdar://15450637
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 93791d7667..61e58c4bef 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -1934,6 +1934,10 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property, if (property->hasAttr<ObjCReturnsInnerPointerAttr>()) GetterMethod->addAttr( ::new (Context) ObjCReturnsInnerPointerAttr(Loc, Context)); + + if (const SectionAttr *SA = property->getAttr<SectionAttr>()) + GetterMethod->addAttr(::new (Context) SectionAttr(Loc, + Context, SA->getName())); if (getLangOpts().ObjCAutoRefCount) CheckARCMethodDecl(GetterMethod); @@ -1984,7 +1988,9 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property, // and the real context should be the same. if (lexicalDC) SetterMethod->setLexicalDeclContext(lexicalDC); - + if (const SectionAttr *SA = property->getAttr<SectionAttr>()) + SetterMethod->addAttr(::new (Context) SectionAttr(Loc, + Context, SA->getName())); // It's possible for the user to have set a very odd custom // setter selector that causes it to have a method family. if (getLangOpts().ObjCAutoRefCount) |