From bada7f5143e28101db8a88252bdb5cd56f0c417e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 19 Mar 2019 01:51:19 +0000 Subject: Factor out repeated code parsing and concatenating header-names from tokens. We now actually form an angled_string_literal token for a header name by concatenation rather than just working out what its contents would be. This substantially simplifies downstream processing and is necessary for C++20 header unit imports. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356433 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/PreprocessorLexer.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/Lex/PreprocessorLexer.cpp') diff --git a/lib/Lex/PreprocessorLexer.cpp b/lib/Lex/PreprocessorLexer.cpp index f721bdcd1e..5f6f4a1341 100644 --- a/lib/Lex/PreprocessorLexer.cpp +++ b/lib/Lex/PreprocessorLexer.cpp @@ -30,9 +30,7 @@ PreprocessorLexer::PreprocessorLexer(Preprocessor *pp, FileID fid) /// After the preprocessor has parsed a \#include, lex and /// (potentially) macro expand the filename. void PreprocessorLexer::LexIncludeFilename(Token &FilenameTok) { - assert(ParsingPreprocessorDirective && - ParsingFilename == false && - "Must be in a preprocessing directive!"); + assert(ParsingFilename == false && "reentered LexIncludeFilename"); // We are now parsing a filename! ParsingFilename = true; @@ -45,10 +43,6 @@ void PreprocessorLexer::LexIncludeFilename(Token &FilenameTok) { // We should have obtained the filename now. ParsingFilename = false; - - // No filename? - if (FilenameTok.is(tok::eod)) - PP->Diag(FilenameTok.getLocation(), diag::err_pp_expects_filename); } /// getFileEntry - Return the FileEntry corresponding to this FileID. Like -- cgit v1.2.1