diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-12-20 00:15:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-12-20 00:15:17 +0000 |
commit | 97394f23ca55c35beaa1538e446e5154f311f49c (patch) | |
tree | a1ec37b85b28e403e9b09202f908125873e9821f /include/clang/Basic/SourceManager.h | |
parent | c27c665c88b49dfb212aedc7bab8b9bf67658b9e (diff) |
Added method getFileEntryForID() to SourceManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 2d60404ee9..16a7c71905 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -364,6 +364,12 @@ public: return getContentCacheForLoc(Loc)->Entry; } + /// getFileEntryForID - Returns the FileEntry record for the provided FileID. + const FileEntry* getFileEntryForID(unsigned id) const { + return getContentCache(id)->Entry; + } + + /// getDecomposedFileLoc - Decompose the specified file location into a raw /// FileID + Offset pair. The first element is the FileID, the second is the /// offset from the start of the buffer of the location. |