summaryrefslogtreecommitdiffstats
path: root/clang/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
commit3793bba26f07de9be04930dcce2c631c715e9a5c (patch)
treea48bbc432a74bc0ef3bb0206e78c0761aee13183 /clang/lib/Lex/PTHLexer.cpp
parentd32480d3db582186355d575db0421dd2823080b6 (diff)
downloadbcm5719-llvm-3793bba26f07de9be04930dcce2c631c715e9a5c.tar.gz
bcm5719-llvm-3793bba26f07de9be04930dcce2c631c715e9a5c.zip
suck the call to "getSpellingLoc" that all clients do into
the implementation of PTHManager::getSpelling. llvm-svn: 62408
Diffstat (limited to 'clang/lib/Lex/PTHLexer.cpp')
-rw-r--r--clang/lib/Lex/PTHLexer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp
index b2870f46fdb..fd7c367c70a 100644
--- a/clang/lib/Lex/PTHLexer.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud