merge two checks for identifiers in the pth loop into one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62677 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp
index 99bb3f7..aa59db5 100644
--- a/lib/Lex/PTHLexer.cpp
+++ b/lib/Lex/PTHLexer.cpp
@@ -125,11 +125,19 @@
Tok.setKind(TKind);
Tok.setFlag(TFlags);
assert(!LexingRawMode);
- if (IdentifierID)
- Tok.setIdentifierInfo(PTHMgr.GetIdentifierInfo(IdentifierID-1));
Tok.setLocation(FileStartLoc.getFileLocWithOffset(FileOffset));
Tok.setLength(Len);
+ // Handle identifiers.
+ if (IdentifierID) {
+ MIOpt.ReadToken();
+ IdentifierInfo *II = PTHMgr.GetIdentifierInfo(IdentifierID-1);
+ Tok.setIdentifierInfo(II);
+ if (II->isHandleIdentifierCase())
+ PP->HandleIdentifier(Tok);
+ return;
+ }
+
//===--------------------------------------==//
// Process the token.
//===--------------------------------------==//
@@ -141,13 +149,6 @@
<< '\n';
#endif
- if (TKind == tok::identifier) {
- MIOpt.ReadToken();
- if (Tok.getIdentifierInfo()->isHandleIdentifierCase())
- PP->HandleIdentifier(Tok);
- return;
- }
-
if (TKind == tok::eof) {
// Save the end-of-file token.
EofToken = Tok;