[cfe-commits] r38554 - /cfe/cfe/trunk/include/clang/Lex/Preprocessor.h

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:22:33 PDT 2007


Author: sabre
Date: Wed Jul 11 11:22:33 2007
New Revision: 38554

URL: http://llvm.org/viewvc/llvm-project?rev=38554&view=rev
Log:
remove an extraneous method

Modified:
    cfe/cfe/trunk/include/clang/Lex/Preprocessor.h

Modified: cfe/cfe/trunk/include/clang/Lex/Preprocessor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Lex/Preprocessor.h?rev=38554&r1=38553&r2=38554&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/Lex/Preprocessor.h (original)
+++ cfe/cfe/trunk/include/clang/Lex/Preprocessor.h Wed Jul 11 11:22:33 2007
@@ -196,11 +196,6 @@
     if (SkippingContents) return 0;
     return &IdentifierInfo.get(NameStart, NameEnd);
   }
-  IdentifierTokenInfo *getIdentifierInfo(const std::string &Name) {
-    // If we are in a "#if 0" block, don't bother lookup up identifiers.
-    if (SkippingContents) return 0;
-    return &IdentifierInfo.get(Name);
-  }
   
   /// AddKeyword - This method is used to associate a token ID with specific
   /// identifiers because they are language keywords.  This causes the lexer to
@@ -217,7 +212,8 @@
     // and extensions are disabled.
     if (Flags+Features.NoExtensions >= 2) return;
     
-    IdentifierTokenInfo &Info = *getIdentifierInfo(Keyword);
+    const char *Str = &Keyword[0];
+    IdentifierTokenInfo &Info = *getIdentifierInfo(Str, Str+Keyword.size());
     Info.setTokenID(TokenCode);
     Info.setIsExtensionToken(Flags == 1);
   }





More information about the cfe-commits mailing list