From 97394f23ca55c35beaa1538e446e5154f311f49c Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 20 Dec 2007 00:15:17 +0000 Subject: [PATCH] Added method getFileEntryForID() to SourceManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45237 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/SourceManager.h | 6 ++++++ 1 file changed, 6 insertions(+) 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. -- 2.50.1