]> granicus.if.org Git - clang/commitdiff
Added method getFileEntryForID() to SourceManager.
authorTed Kremenek <kremenek@apple.com>
Thu, 20 Dec 2007 00:15:17 +0000 (00:15 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 20 Dec 2007 00:15:17 +0000 (00:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45237 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/SourceManager.h

index 2d60404ee9eb71e827555f1ff2c022b0a56386cb..16a7c71905046d53dca352adcfc05e4c4302062c 100644 (file)
@@ -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.