diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-16 07:36:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-16 07:36:28 +0000 |
commit | 8a42586c54f6ec33b657d2c052740fdb52ce3a6c (patch) | |
tree | 457d3b7e94e51e302cb361e9029b43aeee644003 /clang/lib/Lex/Lexer.cpp | |
parent | 3c91971b3391a6aa7f48ee11986813204006adf9 (diff) | |
download | bcm5719-llvm-8a42586c54f6ec33b657d2c052740fdb52ce3a6c.tar.gz bcm5719-llvm-8a42586c54f6ec33b657d2c052740fdb52ce3a6c.zip |
more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.
llvm-svn: 62316
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
-rw-r--r-- | clang/lib/Lex/Lexer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp index 96295d042fb..0eb439a27b6 100644 --- a/clang/lib/Lex/Lexer.cpp +++ b/clang/lib/Lex/Lexer.cpp @@ -179,7 +179,7 @@ unsigned Lexer::MeasureTokenLength(SourceLocation Loc, const SourceManager &SM) { // If this comes from a macro expansion, we really do want the macro name, not // the token this macro expanded to. - Loc = SM.getLogicalLoc(Loc); + Loc = SM.getInstantiationLoc(Loc); const char *StrData = SM.getCharacterData(Loc); @@ -284,12 +284,12 @@ static SourceLocation GetMappedTokenLoc(Preprocessor &PP, // spelling location. SourceManager &SourceMgr = PP.getSourceManager(); - // Create a new SLoc which is expanded from logical(FileLoc) but whose + // Create a new SLoc which is expanded from Instantiation(FileLoc) but whose // characters come from spelling(FileLoc)+Offset. - SourceLocation VirtLoc = SourceMgr.getLogicalLoc(FileLoc); + SourceLocation InstLoc = SourceMgr.getInstantiationLoc(FileLoc); SourceLocation SpellingLoc = SourceMgr.getSpellingLoc(FileLoc); SpellingLoc = SourceLocation::getFileLoc(SpellingLoc.getFileID(), CharNo); - return SourceMgr.getInstantiationLoc(SpellingLoc, VirtLoc); + return SourceMgr.getInstantiationLoc(SpellingLoc, InstLoc); } /// getSourceLocation - Return a source location identifier for the specified |