summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Pragma.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-05-05 22:34:07 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-05-05 22:34:07 +0000
commitce03732ec85296f942ee6644596056ce5e577f89 (patch)
tree9558b898a22576ffb5b637e3195c635ac0c532f6 /clang/lib/Lex/Pragma.cpp
parenta49e7689779a30fbac7beb1ca7dcdc7e2730351b (diff)
downloadbcm5719-llvm-ce03732ec85296f942ee6644596056ce5e577f89.tar.gz
bcm5719-llvm-ce03732ec85296f942ee6644596056ce5e577f89.zip
Permit keywords in module names in #pragma clang module *.
This is necessary to be able to build a libc++ module from preprocessed source (due to the submodule std.new). llvm-svn: 302312
Diffstat (limited to 'clang/lib/Lex/Pragma.cpp')
-rw-r--r--clang/lib/Lex/Pragma.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index 51da2baac9e..99d56182c1b 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -1307,7 +1307,7 @@ static bool LexModuleName(
&ModuleName) {
while (true) {
PP.LexUnexpandedToken(Tok);
- if (Tok.isNot(tok::identifier)) {
+ if (Tok.isAnnotation() || !Tok.getIdentifierInfo()) {
PP.Diag(Tok.getLocation(), diag::err_pp_expected_module_name)
<< ModuleName.empty();
return true;
OpenPOWER on IntegriCloud