aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PTHLexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-17 06:29:33 +0000
committerChris Lattner <sabre@nondot.org>2009-01-17 06:29:33 +0000
commit6b7b84036126a8f2a3e312cfec0a9a4f8ae9d8ed (patch)
tree50bcfc6617efa112aa3896ec7b96512744b4cd63 /lib/Lex/PTHLexer.cpp
parent2b2453a7d8fe732561795431f39ceb2b2a832d84 (diff)
suck the call to "getSpellingLoc" that all clients do into
the implementation of PTHManager::getSpelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r--lib/Lex/PTHLexer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp
index b2870f46fd..fd7c367c70 100644
--- a/lib/Lex/PTHLexer.cpp
+++ b/lib/Lex/PTHLexer.cpp
@@ -311,8 +311,9 @@ unsigned PTHManager::getSpelling(FileID FID, unsigned FPos,
}
unsigned PTHManager::getSpelling(SourceLocation Loc, const char *&Buffer) {
- std::pair<FileID, unsigned> LocInfo =
- PP->getSourceManager().getDecomposedFileLoc(Loc);
+ SourceManager &SM = PP->getSourceManager();
+ Loc = SM.getSpellingLoc(Loc);
+ std::pair<FileID, unsigned> LocInfo = SM.getDecomposedFileLoc(Loc);
return getSpelling(LocInfo.first, LocInfo.second, Buffer);
}