aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-12 16:11:24 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-12 16:11:24 +0000
commit591dc84101228dc391fca05193be5870ec661edc (patch)
tree17224f60ad66eae84ea1502053b97bbe2f8412c8 /lib/Sema/SemaDecl.cpp
parentf3a762a8de396af471f35b77f6897989867c898e (diff)
Allow __module_private__ on fields
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139499 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index d6137e5dba..432354cc7d 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -8079,6 +8079,9 @@ FieldDecl *Sema::HandleField(Scope *S, RecordDecl *Record,
if (NewFD->isInvalidDecl())
Record->setInvalidDecl();
+ if (D.getDeclSpec().isModulePrivateSpecified())
+ NewFD->setModulePrivate();
+
if (NewFD->isInvalidDecl() && PrevDecl) {
// Don't introduce NewFD into scope; there's already something
// with the same name in the same scope.
@@ -8556,6 +8559,9 @@ Decl *Sema::ActOnIvar(Scope *S,
if (getLangOptions().ObjCAutoRefCount && inferObjCARCLifetime(NewID))
NewID->setInvalidDecl();
+ if (D.getDeclSpec().isModulePrivateSpecified())
+ NewID->setModulePrivate();
+
if (II) {
// FIXME: When interfaces are DeclContexts, we'll need to add
// these to the interface.