summaryrefslogtreecommitdiffstats
path: root/clang/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-20 04:16:23 +0000
committerChris Lattner <sabre@nondot.org>2006-07-20 04:16:23 +0000
commit0f1f50517b8a921c75e398b055726568e6d40d19 (patch)
treed0756ac89f342f3be4bdd83598a4d24422df766f /clang/Lex/Lexer.cpp
parent9100cff7014d619fd5d3e9ef40018ee80f2a27a8 (diff)
downloadbcm5719-llvm-0f1f50517b8a921c75e398b055726568e6d40d19.tar.gz
bcm5719-llvm-0f1f50517b8a921c75e398b055726568e6d40d19.zip
Simplify identifier lookup in raw mode, implementing Preprocessor/macro_fn_lparen_scan2.c.
llvm-svn: 38744
Diffstat (limited to 'clang/Lex/Lexer.cpp')
-rw-r--r--clang/Lex/Lexer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/Lex/Lexer.cpp b/clang/Lex/Lexer.cpp
index a9905f33916..81ccbca7b83 100644
--- a/clang/Lex/Lexer.cpp
+++ b/clang/Lex/Lexer.cpp
@@ -359,6 +359,10 @@ FinishIdentifier:
FormTokenWithChars(Result, CurPtr);
Result.SetKind(tok::identifier);
+ // If we are in raw mode, return this identifier raw. There is no need to
+ // look up identifier information or attempt to macro expand it.
+ if (LexingRawMode) return;
+
// Fill in Result.IdentifierInfo, looking up the identifier in the
// identifier table.
PP.LookUpIdentifierInfo(Result, IdStart);
OpenPOWER on IntegriCloud