diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-05 22:34:07 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-05 22:34:07 +0000 |
commit | 4d1775b4eab190b2916bd2e5b19d1d55731e2cd9 (patch) | |
tree | 197a090a279bc90db3f0d5f25704990692fb9c4d /lib/Lex | |
parent | bc4ab6d64d9314f4391752e17068eea2b9377e53 (diff) |
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302312 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex')
-rw-r--r-- | lib/Lex/Pragma.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp index 51da2baac9..99d56182c1 100644 --- a/lib/Lex/Pragma.cpp +++ b/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; |