summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-03-01 22:07:04 +0000
committerTed Kremenek <kremenek@apple.com>2012-03-01 22:07:04 +0000
commitc1e4dd0e8e6ec8b638bc87ee6dd55f114a4d0e2f (patch)
tree3ef4165164d5e48da3a9dee129d627e6e44f1889 /clang/lib/Lex
parent8dc53af5dcbbcbb00faf3ed3cc3e62c982007144 (diff)
downloadbcm5719-llvm-c1e4dd0e8e6ec8b638bc87ee6dd55f114a4d0e2f.tar.gz
bcm5719-llvm-c1e4dd0e8e6ec8b638bc87ee6dd55f114a4d0e2f.zip
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. llvm-svn: 151841
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp2
-rw-r--r--clang/lib/Lex/Preprocessor.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 0364e4279a5..b08bcffd202 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/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/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 96dfe360069..b6ea65de499 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud