summaryrefslogtreecommitdiffstats
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-11-05 17:18:09 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-11-05 17:18:09 +0000
commitb3a51061b1b9c4add078237850649f7c9efb13ab (patch)
tree8b316eca843681b024034db1125707173b9adb4a /include/clang/Lex/Preprocessor.h
parentb6d5e15aae202f157c6cd63da8fa4b089e7b31e9 (diff)
downloadFreeBSD-src-b3a51061b1b9c4add078237850649f7c9efb13ab.zip
FreeBSD-src-b3a51061b1b9c4add078237850649f7c9efb13ab.tar.gz
Update clang to r86140.
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h20
1 files changed, 4 insertions, 16 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 35960ff..2783716 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 {
OpenPOWER on IntegriCloud