diff options
author | dim <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
commit | 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab (patch) | |
tree | 64a10f4c4154739d4a8191d7e1b52ce497f4ebd6 /lib/Lex/Pragma.cpp | |
parent | a0fb00f9837bd0d2e5948f16f6a6b82a7a628f51 (diff) | |
download | FreeBSD-src-110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab.zip FreeBSD-src-110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab.tar.gz |
Vendor import of clang trunk r130700:
http://llvm.org/svn/llvm-project/cfe/trunk@130700
Diffstat (limited to 'lib/Lex/Pragma.cpp')
-rw-r--r-- | lib/Lex/Pragma.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp index 80d3bb1..0c18091 100644 --- a/lib/Lex/Pragma.cpp +++ b/lib/Lex/Pragma.cpp @@ -229,8 +229,8 @@ void Preprocessor::HandleMicrosoft__pragma(Token &Tok) { PragmaToks.front().setFlag(Token::LeadingSpace); - // Replace the ')' with an EOM to mark the end of the pragma. - PragmaToks.back().setKind(tok::eom); + // Replace the ')' with an EOD to mark the end of the pragma. + PragmaToks.back().setKind(tok::eod); Token *TokArray = new Token[PragmaToks.size()]; std::copy(PragmaToks.begin(), PragmaToks.end(), TokArray); @@ -283,7 +283,7 @@ void Preprocessor::HandlePragmaPoison(Token &PoisonTok) { if (CurPPLexer) CurPPLexer->LexingRawMode = false; // If we reached the end of line, we're done. - if (Tok.is(tok::eom)) return; + if (Tok.is(tok::eod)) return; // Can only poison identifiers. if (Tok.isNot(tok::raw_identifier)) { @@ -348,8 +348,8 @@ void Preprocessor::HandlePragmaDependency(Token &DependencyTok) { Token FilenameTok; CurPPLexer->LexIncludeFilename(FilenameTok); - // If the token kind is EOM, the error has already been diagnosed. - if (FilenameTok.is(tok::eom)) + // If the token kind is EOD, the error has already been diagnosed. + if (FilenameTok.is(tok::eod)) return; // Reserve a buffer to get the spelling. @@ -368,7 +368,7 @@ void Preprocessor::HandlePragmaDependency(Token &DependencyTok) { // Search include directories for this file. const DirectoryLookup *CurDir; - const FileEntry *File = LookupFile(Filename, isAngled, 0, CurDir); + const FileEntry *File = LookupFile(Filename, isAngled, 0, CurDir, NULL, NULL); if (File == 0) { Diag(FilenameTok, diag::err_pp_file_not_found) << Filename; return; @@ -381,7 +381,7 @@ void Preprocessor::HandlePragmaDependency(Token &DependencyTok) { // Lex tokens at the end of the message and include them in the message. std::string Message; Lex(DependencyTok); - while (DependencyTok.isNot(tok::eom)) { + while (DependencyTok.isNot(tok::eod)) { Message += getSpelling(DependencyTok) + " "; Lex(DependencyTok); } @@ -470,7 +470,7 @@ void Preprocessor::HandlePragmaComment(Token &Tok) { } Lex(Tok); // eat the r_paren. - if (Tok.isNot(tok::eom)) { + if (Tok.isNot(tok::eod)) { Diag(Tok.getLocation(), diag::err_pragma_comment_malformed); return; } @@ -541,7 +541,7 @@ void Preprocessor::HandlePragmaMessage(Token &Tok) { Lex(Tok); // eat the r_paren. } - if (Tok.isNot(tok::eom)) { + if (Tok.isNot(tok::eod)) { Diag(Tok.getLocation(), diag::err_pragma_message_malformed); return; } @@ -737,10 +737,10 @@ bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) { return true; } - // Verify that this is followed by EOM. + // Verify that this is followed by EOD. LexUnexpandedToken(Tok); - if (Tok.isNot(tok::eom)) - Diag(Tok, diag::ext_pragma_syntax_eom); + if (Tok.isNot(tok::eod)) + Diag(Tok, diag::ext_pragma_syntax_eod); return false; } @@ -883,7 +883,7 @@ public: PP.LexUnexpandedToken(Tok); } - if (Tok.isNot(tok::eom)) { + if (Tok.isNot(tok::eod)) { PP.Diag(Tok.getLocation(), diag::warn_pragma_diagnostic_invalid_token); return; } |