diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-15 21:26:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-15 21:26:50 +0000 |
commit | 6678133b8ce642f93e5141f056fa643112041ad0 (patch) | |
tree | 3a9f46dfb9270efc2f17fb986dd9cf0e23f560b2 /include/clang/Basic/SourceManager.h | |
parent | 736166b38235cf6d0ffb67638960d95fb2afcbd6 (diff) |
add a new SourceManager::getInstantiationRange helper method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index d5845baa31..b29a1acd4a 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -425,8 +425,8 @@ public: return SourceLocation::getFileLoc(FileOffset); } - /// Given a SourceLocation object, return the instantiation location - /// referenced by the ID. + /// getInstantiationLoc - Given a SourceLocation object, return the + /// instantiation location referenced by the ID. SourceLocation getInstantiationLoc(SourceLocation Loc) const { // Handle the non-mapped case inline, defer to out of line code to handle // instantiations. @@ -439,6 +439,12 @@ public: std::pair<SourceLocation,SourceLocation> getImmediateInstantiationRange(SourceLocation Loc) const; + /// getInstantiationRange - Given a SourceLocation object, return the + /// range of tokens covered by the instantiation in the ultimate file. + std::pair<SourceLocation,SourceLocation> + getInstantiationRange(SourceLocation Loc) const; + + /// getSpellingLoc - Given a SourceLocation object, return the spelling /// location referenced by the ID. This is the place where the characters /// that make up the lexed token can be found. |