From 39b49bcaaddb1049234fca9500c0ac02c088e23d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 23 Nov 2010 08:35:12 +0000 Subject: now the FileManager has a FileSystemOpts ivar, stop threading FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on FileManager without creating one in some code paths in cindextext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120010 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/SourceManager.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/Basic/SourceManager.cpp') diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp index 2e47cdc275..eaa911830f 100644 --- a/lib/Basic/SourceManager.cpp +++ b/lib/Basic/SourceManager.cpp @@ -73,9 +73,7 @@ const llvm::MemoryBuffer *ContentCache::getBuffer(Diagnostic &Diag, // Lazily create the Buffer for ContentCaches that wrap files. if (!Buffer.getPointer() && Entry) { std::string ErrorStr; - Buffer.setPointer(SM.getFileManager().getBufferForFile(Entry, - SM.getFileSystemOpts(), - &ErrorStr)); + Buffer.setPointer(SM.getFileManager().getBufferForFile(Entry, &ErrorStr)); // If we were unable to open the file, then we are in an inconsistent // situation where the content cache referenced a file which no longer @@ -332,9 +330,8 @@ LineTableInfo &SourceManager::getLineTable() { // Private 'Create' methods. //===----------------------------------------------------------------------===// -SourceManager::SourceManager(Diagnostic &Diag, FileManager &FileMgr, - const FileSystemOptions &FSOpts) - : Diag(Diag), FileMgr(FileMgr), FileSystemOpts(FSOpts), +SourceManager::SourceManager(Diagnostic &Diag, FileManager &FileMgr) + : Diag(Diag), FileMgr(FileMgr), ExternalSLocEntries(0), LineTable(0), NumLinearScans(0), NumBinaryProbes(0) { clearIDTables(); -- cgit v1.2.3-18-g5258