From 3793bba26f07de9be04930dcce2c631c715e9a5c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 17 Jan 2009 06:29:33 +0000 Subject: suck the call to "getSpellingLoc" that all clients do into the implementation of PTHManager::getSpelling. llvm-svn: 62408 --- clang/lib/Lex/PTHLexer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/lib/Lex/PTHLexer.cpp') 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 LocInfo = - PP->getSourceManager().getDecomposedFileLoc(Loc); + SourceManager &SM = PP->getSourceManager(); + Loc = SM.getSpellingLoc(Loc); + std::pair LocInfo = SM.getDecomposedFileLoc(Loc); return getSpelling(LocInfo.first, LocInfo.second, Buffer); } -- cgit v1.2.3