[cfe-commits] r61734 - /cfe/trunk/lib/Lex/Preprocessor.cpp
Chris Lattner
sabre at nondot.org
Mon Jan 5 11:44:41 PST 2009
Author: lattner
Date: Mon Jan 5 13:44:41 2009
New Revision: 61734
URL: http://llvm.org/viewvc/llvm-project?rev=61734&view=rev
Log:
simplify Preprocessor::getSpelling now that identifiers carry around
their length.
Modified:
cfe/trunk/lib/Lex/Preprocessor.cpp
Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=61734&r1=61733&r2=61734&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Mon Jan 5 13:44:41 2009
@@ -234,13 +234,7 @@
// table, which is very quick.
if (const IdentifierInfo *II = Tok.getIdentifierInfo()) {
Buffer = II->getName();
-
- // Return the length of the token. If the token needed cleaning, don't
- // include the size of the newlines or trigraphs in it.
- if (!Tok.needsCleaning())
- return Tok.getLength();
- else
- return strlen(Buffer);
+ return II->getLength();
}
// Otherwise, compute the start of the token in the input lexer buffer.
More information about the cfe-commits
mailing list