summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-03 18:04:46 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-03 18:04:46 +0000
commit22d0974b40673d2492c5427e4066743223cab696 (patch)
treec6f73e4f476920769896981552fb01f646313085 /clang/lib/Sema/SemaDecl.cpp
parente097d4ba268d4a04845d23143672953d9efb6302 (diff)
downloadbcm5719-llvm-22d0974b40673d2492c5427e4066743223cab696.tar.gz
bcm5719-llvm-22d0974b40673d2492c5427e4066743223cab696.zip
Introduce a non-uglified syntax for module imports in Objective-C:
@import identifier [. identifier]* ; llvm-svn: 147452
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index a1ccf946d6a..9583ab6327f 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -9896,7 +9896,9 @@ Decl *Sema::ActOnFileScopeAsmDecl(Expr *expr,
return New;
}
-DeclResult Sema::ActOnModuleImport(SourceLocation ImportLoc, ModuleIdPath Path) {
+DeclResult Sema::ActOnModuleImport(SourceLocation AtLoc,
+ SourceLocation ImportLoc,
+ ModuleIdPath Path) {
Module *Mod = PP.getModuleLoader().loadModule(ImportLoc, Path,
Module::AllVisible,
/*IsIncludeDirective=*/false);
@@ -9917,8 +9919,8 @@ DeclResult Sema::ActOnModuleImport(SourceLocation ImportLoc, ModuleIdPath Path)
ImportDecl *Import = ImportDecl::Create(Context,
Context.getTranslationUnitDecl(),
- ImportLoc, Mod,
- IdentifierLocs);
+ AtLoc.isValid()? AtLoc : ImportLoc,
+ Mod, IdentifierLocs);
Context.getTranslationUnitDecl()->addDecl(Import);
return Import;
}
OpenPOWER on IntegriCloud