diff options
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
| -rw-r--r-- | include/clang/Lex/Preprocessor.h | 20 | 
1 files changed, 4 insertions, 16 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 35960ff328a6..2783716b89ff 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -96,7 +96,7 @@ class Preprocessor {    /// Identifiers - This is mapping/lookup information for all identifiers in    /// the program, including program keywords. -  IdentifierTable Identifiers; +  mutable IdentifierTable Identifiers;    /// Selectors - This table contains all the selectors in the program. Unlike    /// IdentifierTable above, this table *isn't* populated by the preprocessor. @@ -296,12 +296,8 @@ public:    /// pointers is preferred unless the identifier is already available as a    /// string (this avoids allocation and copying of memory to construct an    /// std::string). -  IdentifierInfo *getIdentifierInfo(const char *NameStart, -                                    const char *NameEnd) { -    return &Identifiers.get(NameStart, NameEnd); -  } -  IdentifierInfo *getIdentifierInfo(const char *NameStr) { -    return getIdentifierInfo(NameStr, NameStr+strlen(NameStr)); +  IdentifierInfo *getIdentifierInfo(llvm::StringRef Name) const { +    return &Identifiers.get(Name);    }    /// AddPragmaHandler - Add the specified pragma handler to the preprocessor. @@ -583,7 +579,7 @@ public:    /// LookUpIdentifierInfo - Given a tok::identifier token, look up the    /// identifier information for the token and install it into the token.    IdentifierInfo *LookUpIdentifierInfo(Token &Identifier, -                                       const char *BufPtr = 0); +                                       const char *BufPtr = 0) const;    /// HandleIdentifier - This callback is invoked when the lexer reads an    /// identifier and has filled in the tokens IdentifierInfo member.  This @@ -831,14 +827,6 @@ public:    void HandleComment(SourceRange Comment);  }; -/// PreprocessorFactory - A generic factory interface for lazily creating -///  Preprocessor objects on-demand when they are needed. -class PreprocessorFactory { -public: -  virtual ~PreprocessorFactory(); -  virtual Preprocessor* CreatePreprocessor() = 0; -}; -  /// \brief Abstract base class that describes a handler that will receive  /// source ranges for each of the comments encountered in the source file.  class CommentHandler {  | 
