diff options
author | Chris Lattner <sabre@nondot.org> | 2007-07-15 06:35:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-07-15 06:35:27 +0000 |
commit | abca2bba54197256f2830f757218cfbea2ed9cd1 (patch) | |
tree | 2a4f7e2429572041e60ee6ad6c2acb417875c552 /Lex/MacroExpander.cpp | |
parent | fa2eaabd304172dd8afc561f6156a65f8d0e442b (diff) |
Change SourceManager::getInstantiationLoc to take virtual locations, doing its
virtual->physical mapping explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Lex/MacroExpander.cpp')
-rw-r--r-- | Lex/MacroExpander.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lex/MacroExpander.cpp b/Lex/MacroExpander.cpp index 7a46b14297..c98949ec1d 100644 --- a/Lex/MacroExpander.cpp +++ b/Lex/MacroExpander.cpp @@ -499,8 +499,8 @@ void MacroExpander::Lex(LexerToken &Tok) { // The token could have come from a prior macro expansion. In that case, // ignore the macro expand part to get to the physloc. This happens for // stuff like: #define A(X) X A(A(X)) A(1) - SourceLocation PhysLoc = SrcMgr.getPhysicalLoc(Tok.getLocation()); - Tok.setLocation(SrcMgr.getInstantiationLoc(PhysLoc, InstantiateLoc)); + Tok.setLocation(SrcMgr.getInstantiationLoc(Tok.getLocation(), + InstantiateLoc)); } // If this is the first token, set the lexical properties of the token to |