diff options
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 2098698400..4f5c17344d 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -33,6 +33,7 @@ namespace clang { class Diagnostic; class SourceManager; class FileManager; +class FileSystemOptions; class FileEntry; class LineTableInfo; @@ -369,7 +370,10 @@ public: class SourceManager { /// \brief Diagnostic object. Diagnostic &Diag; - + + FileManager &FileMgr; + const FileSystemOptions &FileSystemOpts; + mutable llvm::BumpPtrAllocator ContentCacheAlloc; /// FileInfos - Memoized information about all of the files tracked by this @@ -427,8 +431,10 @@ class SourceManager { explicit SourceManager(const SourceManager&); void operator=(const SourceManager&); public: - SourceManager(Diagnostic &Diag) - : Diag(Diag), ExternalSLocEntries(0), LineTable(0), NumLinearScans(0), + SourceManager(Diagnostic &Diag, FileManager &FileMgr, + const FileSystemOptions &FSOpts) + : Diag(Diag), FileMgr(FileMgr), FileSystemOpts(FSOpts), + ExternalSLocEntries(0), LineTable(0), NumLinearScans(0), NumBinaryProbes(0) { clearIDTables(); } @@ -438,6 +444,9 @@ public: Diagnostic &getDiagnostics() const { return Diag; } + FileManager &getFileManager() const { return FileMgr; } + const FileSystemOptions &getFileSystemOpts() const { return FileSystemOpts; } + //===--------------------------------------------------------------------===// // MainFileID creation and querying methods. //===--------------------------------------------------------------------===// |