diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-05 01:53:52 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-05 01:53:52 +0000 |
commit | c3222091e1ffa35d0264ca6b680a88c9dc84ede2 (patch) | |
tree | 90d2d26ac445e398191678658f3f3655746bef86 /lib/Lex/Preprocessor.cpp | |
parent | 3da736c1143126be19b253804b3b135ebcd3d6ff (diff) |
Make LookUpIdentifierInfo const. This makes the Identifiers table mutable and is
a little fuzzy, but conceptually it's just uniquing the identifier.
Chris, please review. I debated splitting into const/non-const versions where
the const one propogated constness to the resulting IdentifierInfo*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index eddff746f6..487b9d63c1 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -401,7 +401,7 @@ void Preprocessor::EnterMainSourceFile() { /// LookUpIdentifierInfo - Given a tok::identifier token, look up the /// identifier information for the token and install it into the token. IdentifierInfo *Preprocessor::LookUpIdentifierInfo(Token &Identifier, - const char *BufPtr) { + const char *BufPtr) const { assert(Identifier.is(tok::identifier) && "Not an identifier!"); assert(Identifier.getIdentifierInfo() == 0 && "Identinfo already exists!"); |