aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-03 18:24:14 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-03 18:24:14 +0000
commit94ad28b31433058445a27db722f60402ee820bea (patch)
tree9c60fe2e61231fcf462546f6c922aef0f9f5ff1f /lib/Parse/ParseObjc.cpp
parent5948ae1021122164b22f74353bb7fe325a64f616 (diff)
Under -fmodules, accept #public <macroname> and #private <macroname>
to make a macro public (the default for headers) or private, respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147455 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index a2994a3312..3ecdae2978 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -67,7 +67,11 @@ Parser::DeclGroupPtrTy Parser::ParseObjCAtDirectives() {
SingleDecl = ParseObjCPropertyDynamic(AtLoc);
break;
case tok::objc_import:
- return ParseModuleImport(AtLoc);
+ if (getLang().Modules)
+ return ParseModuleImport(AtLoc);
+
+ // Fall through
+
default:
Diag(AtLoc, diag::err_unexpected_at);
SkipUntil(tok::semi);