Switch lexer/pp over to new Token::is/isNot api


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42799 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Lex/Pragma.cpp b/Lex/Pragma.cpp
index 89725ae..05e524c 100644
--- a/Lex/Pragma.cpp
+++ b/Lex/Pragma.cpp
@@ -93,13 +93,12 @@
   
   // Read the '('.
   Lex(Tok);
-  if (Tok.getKind() != tok::l_paren)
+  if (Tok.isNot(tok::l_paren))
     return Diag(PragmaLoc, diag::err__Pragma_malformed);
 
   // Read the '"..."'.
   Lex(Tok);
-  if (Tok.getKind() != tok::string_literal &&
-      Tok.getKind() != tok::wide_string_literal)
+  if (Tok.isNot(tok::string_literal) && Tok.isNot(tok::wide_string_literal))
     return Diag(PragmaLoc, diag::err__Pragma_malformed);
   
   // Remember the string.
@@ -108,7 +107,7 @@
 
   // Read the ')'.
   Lex(Tok);
-  if (Tok.getKind() != tok::r_paren)
+  if (Tok.isNot(tok::r_paren))
     return Diag(PragmaLoc, diag::err__Pragma_malformed);
   
   // The _Pragma is lexically sound.  Destringize according to C99 6.10.9.1.
@@ -194,10 +193,10 @@
     if (CurLexer) CurLexer->LexingRawMode = false;
     
     // If we reached the end of line, we're done.
-    if (Tok.getKind() == tok::eom) return;
+    if (Tok.is(tok::eom)) return;
     
     // Can only poison identifiers.
-    if (Tok.getKind() != tok::identifier) {
+    if (Tok.isNot(tok::identifier)) {
       Diag(Tok, diag::err_pp_invalid_poison);
       return;
     }
@@ -247,7 +246,7 @@
   CurLexer->LexIncludeFilename(FilenameTok);
 
   // If the token kind is EOM, the error has already been diagnosed.
-  if (FilenameTok.getKind() == tok::eom)
+  if (FilenameTok.is(tok::eom))
     return;
   
   // Reserve a buffer to get the spelling.
@@ -280,7 +279,7 @@
     // Lex tokens at the end of the message and include them in the message.
     std::string Message;
     Lex(DependencyTok);
-    while (DependencyTok.getKind() != tok::eom) {
+    while (DependencyTok.isNot(tok::eom)) {
       Message += getSpelling(DependencyTok) + " ";
       Lex(DependencyTok);
     }