diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-03-01 22:07:04 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-03-01 22:07:04 +0000 |
commit | 32ad2ee2618745ce3da51c2ae066ed5f21157c07 (patch) | |
tree | 75ce3669bcdce6d2e76de48f0c88bb48e31d2e22 /lib | |
parent | b3d7275c1a4a9f676af850cd661b56c4ad7ef5c9 (diff) |
Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules,
and don't have time to push it forward in the near future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/DeclPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Basic/IdentifierTable.cpp | 2 | ||||
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 2 | ||||
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 12 | ||||
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 2 | ||||
-rw-r--r-- | lib/Parse/Parser.cpp | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index 32bdba1a0b..74e1c1bb9d 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/lib/AST/DeclPrinter.cpp @@ -650,7 +650,7 @@ void DeclPrinter::VisitFileScopeAsmDecl(FileScopeAsmDecl *D) { } void DeclPrinter::VisitImportDecl(ImportDecl *D) { - Out << "@import " << D->getImportedModule()->getFullModuleName() + Out << "@__experimental_modules_import " << D->getImportedModule()->getFullModuleName() << ";\n"; } diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index 8bd76252b3..8945c2f47c 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -41,7 +41,7 @@ IdentifierInfo::IdentifierInfo() { ChangedAfterLoad = false; RevertedTokenID = false; OutOfDate = false; - IsImport = false; + IsModulesImport = false; FETokenInfo = 0; Entry = 0; } diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index 0364e4279a..b08bcffd20 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -1401,7 +1401,7 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, Diag(HashLoc, diag::warn_auto_module_import) << IncludeKind << PathString << FixItHint::CreateReplacement(ReplaceRange, - "@import " + PathString.str().str() + ";"); + "@__experimental_modules_import " + PathString.str().str() + ";"); } // Load the module. diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 96dfe36006..b6ea65de49 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -565,13 +565,13 @@ void Preprocessor::HandleIdentifier(Token &Identifier) { if (II.isExtensionToken() && !DisableMacroExpansion) Diag(Identifier, diag::ext_token_used); - // If this is the 'import' contextual keyword, note that the next token - // indicates a module name. + // If this is the '__experimental_modules_import' contextual keyword, note + // that the next token indicates a module name. // - // Note that we do not treat 'import' as a contextual keyword when we're - // in a caching lexer, because caching lexers only get used in contexts where - // import declarations are disallowed. - if (II.isImport() && !InMacroArgs && !DisableMacroExpansion && + // Note that we do not treat '__experimental_modules_import' as a contextual + // keyword when we're in a caching lexer, because caching lexers only get + // used in contexts where import declarations are disallowed. + if (II.isModulesImport() && !InMacroArgs && !DisableMacroExpansion && getLangOptions().Modules && CurLexerKind != CLK_CachingLexer) { ModuleImportLoc = Identifier.getLocation(); ModuleImportPath.clear(); diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index b135bba488..eea9a7e981 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -64,7 +64,7 @@ Parser::DeclGroupPtrTy Parser::ParseObjCAtDirectives() { case tok::objc_dynamic: SingleDecl = ParseObjCPropertyDynamic(AtLoc); break; - case tok::objc_import: + case tok::objc___experimental_modules_import: if (getLang().Modules) return ParseModuleImport(AtLoc); diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index 6927c50b8f..6a479bc60c 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -1609,7 +1609,7 @@ void Parser::ParseMicrosoftIfExistsExternalDeclaration() { } Parser::DeclGroupPtrTy Parser::ParseModuleImport(SourceLocation AtLoc) { - assert(Tok.isObjCAtKeyword(tok::objc_import) && + assert(Tok.isObjCAtKeyword(tok::objc___experimental_modules_import) && "Improper start to module import"); SourceLocation ImportLoc = ConsumeToken(); |