diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-03 18:04:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-03 18:04:46 +0000 |
commit | 5948ae1021122164b22f74353bb7fe325a64f616 (patch) | |
tree | b10150c1440f0bd3dd2e91cb551228dd191ed587 /lib/AST/Decl.cpp | |
parent | 674949fe3fdd796fc643f0e7660cb973da1dd383 (diff) |
Introduce a non-uglified syntax for module imports in Objective-C:
@import identifier [. identifier]* ;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index c1ed43709e..31a9b3b292 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -2755,10 +2755,10 @@ static unsigned getNumModuleIdentifiers(Module *Mod) { return Result; } -ImportDecl::ImportDecl(DeclContext *DC, SourceLocation ImportLoc, +ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc, Module *Imported, ArrayRef<SourceLocation> IdentifierLocs) - : Decl(Import, DC, ImportLoc), ImportedAndComplete(Imported, true), + : Decl(Import, DC, StartLoc), ImportedAndComplete(Imported, true), NextLocalImport() { assert(getNumModuleIdentifiers(Imported) == IdentifierLocs.size()); @@ -2767,28 +2767,28 @@ ImportDecl::ImportDecl(DeclContext *DC, SourceLocation ImportLoc, IdentifierLocs.size() * sizeof(SourceLocation)); } -ImportDecl::ImportDecl(DeclContext *DC, SourceLocation ImportLoc, +ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc, Module *Imported, SourceLocation EndLoc) - : Decl(Import, DC, ImportLoc), ImportedAndComplete(Imported, false), + : Decl(Import, DC, StartLoc), ImportedAndComplete(Imported, false), NextLocalImport() { *reinterpret_cast<SourceLocation *>(this + 1) = EndLoc; } ImportDecl *ImportDecl::Create(ASTContext &C, DeclContext *DC, - SourceLocation ImportLoc, Module *Imported, + SourceLocation StartLoc, Module *Imported, ArrayRef<SourceLocation> IdentifierLocs) { void *Mem = C.Allocate(sizeof(ImportDecl) + IdentifierLocs.size() * sizeof(SourceLocation)); - return new (Mem) ImportDecl(DC, ImportLoc, Imported, IdentifierLocs); + return new (Mem) ImportDecl(DC, StartLoc, Imported, IdentifierLocs); } ImportDecl *ImportDecl::CreateImplicit(ASTContext &C, DeclContext *DC, - SourceLocation ImportLoc, + SourceLocation StartLoc, Module *Imported, SourceLocation EndLoc) { void *Mem = C.Allocate(sizeof(ImportDecl) + sizeof(SourceLocation)); - ImportDecl *Import = new (Mem) ImportDecl(DC, ImportLoc, Imported, EndLoc); + ImportDecl *Import = new (Mem) ImportDecl(DC, StartLoc, Imported, EndLoc); Import->setImplicit(); return Import; } |