aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-16 07:10:29 +0000
committerChris Lattner <sabre@nondot.org>2009-01-16 07:10:29 +0000
commit0c21e84b82191ae1c4d04444a84008c464433868 (patch)
tree2fe16ce99eb6fe7be8117e0af83399e0540bf710 /include/clang/Lex/Preprocessor.h
parentfff745ee450800fed6eb8e515c0866dcb7c4def4 (diff)
rename PP::getPhysicalCharacterAt -> PP::getSpelledCharacterAt.
Slightly speed up sema of numbers like '1' by going directly to TargetInfo instead of through ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index a94c8c1d84..a631a583a9 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -451,16 +451,16 @@ public:
/// if an internal buffer is returned.
unsigned getSpelling(const Token &Tok, const char *&Buffer) const;
- /// getPhysicalCharacterAt - Return a pointer to the start of the specified
- /// location in the appropriate MemoryBuffer.
- char getPhysicalCharacterAt(SourceLocation SL) const {
+ /// getSpelledCharacterAt - Return a pointer to the start of the specified
+ /// location in the appropriate MemoryBuffer.
+ char getSpelledCharacterAt(SourceLocation SL) const {
if (PTH) {
SL = SourceMgr.getSpellingLoc(SL);
- unsigned fid = SourceMgr.getCanonicalFileID(SL);
- unsigned fpos = SourceMgr.getFullFilePos(SL);
- const char* data;
- if (PTH->getSpelling(fid, fpos, data))
- return *data;
+ unsigned FID = SourceMgr.getCanonicalFileID(SL);
+ unsigned FPos = SourceMgr.getFullFilePos(SL);
+ const char *Data;
+ if (PTH->getSpelling(FID, FPos, Data))
+ return *Data;
}
return *SourceMgr.getCharacterData(SL);