aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/PreprocessorLexer.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-12-10 23:20:59 +0000
committerTed Kremenek <kremenek@apple.com>2008-12-10 23:20:59 +0000
commitbc0f6bc0391ecdff331885cdc769c20b2cb628a6 (patch)
treecef5b83f535ba1dde2c9008a4c65cb3457e33f61 /include/clang/Lex/PreprocessorLexer.h
parentcaaf29a08761b14fbe42a29080c22dd6961056d1 (diff)
PreprocessorLexer (and subclasses):
- Added virtual method 'getSourceLocation()' (no arguments) that gets the location of the next "observable" location (e.g., next character, next token). PPLexerChange.cpp: - Implemented FIXME by using PreprocessorLexer::getSourceLocation() to get the location in the file we are returning to after lexing a #included file. This appears to be slightly faster than having the branch (i.e., 'if(CurLexer)'). It's also not a really hot part of the Preprocessor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60860 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/PreprocessorLexer.h')
-rw-r--r--include/clang/Lex/PreprocessorLexer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Lex/PreprocessorLexer.h b/include/clang/Lex/PreprocessorLexer.h
index e178d27374..a889a55b52 100644
--- a/include/clang/Lex/PreprocessorLexer.h
+++ b/include/clang/Lex/PreprocessorLexer.h
@@ -79,6 +79,10 @@ protected:
virtual void IndirectLex(Token& Result) = 0;
+ /// getSourceLocation - Return the source location for the next observable
+ /// location.
+ virtual SourceLocation getSourceLocation() = 0;
+
//===--------------------------------------------------------------------===//
// #if directive handling.