summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/CacheTokens.cpp5
-rw-r--r--clang/lib/Frontend/RewriteMacros.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Frontend/CacheTokens.cpp b/clang/lib/Frontend/CacheTokens.cpp
index c845d56f4ec..ab5465a2fa2 100644
--- a/clang/lib/Frontend/CacheTokens.cpp
+++ b/clang/lib/Frontend/CacheTokens.cpp
@@ -295,7 +295,7 @@ PTHEntry PTHWriter::LexTokens(Lexer& L) {
}
if (Tok.is(tok::identifier)) {
- Tok.setIdentifierInfo(PP.LookUpIdentifierInfo(Tok));
+ PP.LookUpIdentifierInfo(Tok);
EmitToken(Tok);
continue;
}
@@ -321,7 +321,6 @@ PTHEntry PTHWriter::LexTokens(Lexer& L) {
}
IdentifierInfo* II = PP.LookUpIdentifierInfo(Tok);
- Tok.setIdentifierInfo(II);
tok::PPKeywordKind K = II->getPPKeywordID();
ParsingPreprocessorDirective = true;
@@ -344,7 +343,7 @@ PTHEntry PTHWriter::LexTokens(Lexer& L) {
L.setParsingPreprocessorDirective(false);
assert(!Tok.isAtStartOfLine());
if (Tok.is(tok::identifier))
- Tok.setIdentifierInfo(PP.LookUpIdentifierInfo(Tok));
+ PP.LookUpIdentifierInfo(Tok);
break;
}
diff --git a/clang/lib/Frontend/RewriteMacros.cpp b/clang/lib/Frontend/RewriteMacros.cpp
index 0bcbd4ff0ee..954e8e23cac 100644
--- a/clang/lib/Frontend/RewriteMacros.cpp
+++ b/clang/lib/Frontend/RewriteMacros.cpp
@@ -79,7 +79,7 @@ static void LexRawTokensFromMainFile(Preprocessor &PP,
// up the indentifier info. This is important for equality comparison of
// identifier tokens.
if (RawTok.is(tok::identifier) && !RawTok.getIdentifierInfo())
- RawTok.setIdentifierInfo(PP.LookUpIdentifierInfo(RawTok));
+ PP.LookUpIdentifierInfo(RawTok);
RawTokens.push_back(RawTok);
} while (RawTok.isNot(tok::eof));
OpenPOWER on IntegriCloud