diff options
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Lex/PTHLexer.cpp | 10 | ||||
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Lex/TokenConcatenation.cpp | 2 |
4 files changed, 4 insertions, 12 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 196a77f6426..e264efab9d7 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -1071,7 +1071,7 @@ void Preprocessor::HandleIncludeDirective(Token &IncludeTok, // we allow macros that expand to nothing after the filename, because this // falls into the category of "#include pp-tokens new-line" specified in // C99 6.10.2p4. - CheckEndOfDirective(IncludeTok.getIdentifierInfo()->getName(), true); + CheckEndOfDirective(IncludeTok.getIdentifierInfo()->getNameStart(), true); // Check that we don't have infinite #include recursion. if (IncludeMacroStack.size() == MaxAllowedIncludeStackDepth-1) { diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp index 8ca1ec016fe..f17a5d93a91 100644 --- a/clang/lib/Lex/PTHLexer.cpp +++ b/clang/lib/Lex/PTHLexer.cpp @@ -96,14 +96,6 @@ LexNextToken: //===--------------------------------------==// // Process the token. //===--------------------------------------==// -#if 0 - SourceManager& SM = PP->getSourceManager(); - llvm::errs() << SM.getFileEntryForID(FileID)->getName() - << ':' << SM.getLogicalLineNumber(Tok.getLocation()) - << ':' << SM.getLogicalColumnNumber(Tok.getLocation()) - << '\n'; -#endif - if (TKind == tok::eof) { // Save the end-of-file token. EofToken = Tok; @@ -563,7 +555,7 @@ IdentifierInfo* PTHManager::LazilyCreateIdentifierInfo(unsigned PersistentID) { // Store the new IdentifierInfo in the cache. PerIDCache[PersistentID] = II; - assert(II->getName() && II->getName()[0] != '\0'); + assert(II->getNameStart() && II->getNameStart()[0] != '\0'); return II; } diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index e41bc5cab1f..7f3afc60764 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -234,7 +234,7 @@ unsigned Preprocessor::getSpelling(const Token &Tok, // If this token is an identifier, just return the string from the identifier // table, which is very quick. if (const IdentifierInfo *II = Tok.getIdentifierInfo()) { - Buffer = II->getName(); + Buffer = II->getNameStart(); return II->getLength(); } diff --git a/clang/lib/Lex/TokenConcatenation.cpp b/clang/lib/Lex/TokenConcatenation.cpp index ade7f8516ea..07951646ffe 100644 --- a/clang/lib/Lex/TokenConcatenation.cpp +++ b/clang/lib/Lex/TokenConcatenation.cpp @@ -95,7 +95,7 @@ TokenConcatenation::TokenConcatenation(Preprocessor &pp) : PP(pp) { static char GetFirstChar(Preprocessor &PP, const Token &Tok) { if (IdentifierInfo *II = Tok.getIdentifierInfo()) { // Avoid spelling identifiers, the most common form of token. - return II->getName()[0]; + return II->getNameStart()[0]; } else if (!Tok.needsCleaning()) { if (Tok.isLiteral() && Tok.getLiteralData()) { return *Tok.getLiteralData(); |