From 7ad97ffa631af6ad678c79b38341ac995f347ce9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 23 Nov 2010 07:51:02 +0000 Subject: give FileManager a 'FileSystemOptions' ivar, which will be used to simplify a bunch of code in it. It should ultimately get inlined into FileManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120007 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/ASTUnit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Frontend/ASTUnit.cpp') diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index d590d6966f..cbcb08b6fe 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -492,7 +492,7 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename, AST->CaptureDiagnostics = CaptureDiagnostics; AST->Diagnostics = Diags; AST->FileSystemOpts = FileSystemOpts; - AST->FileMgr.reset(new FileManager); + AST->FileMgr.reset(new FileManager(FileSystemOpts)); AST->SourceMgr.reset(new SourceManager(AST->getDiagnostics(), AST->getFileManager(), AST->getFileSystemOpts())); @@ -753,7 +753,7 @@ bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) { // Configure the various subsystems. // FIXME: Should we retain the previous file manager? - FileMgr.reset(new FileManager); + FileMgr.reset(new FileManager(Clang.getFileSystemOpts())); FileSystemOpts = Clang.getFileSystemOpts(); SourceMgr.reset(new SourceManager(getDiagnostics(), *FileMgr, FileSystemOpts)); TheSema.reset(); @@ -1245,7 +1245,7 @@ llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble( TopLevelDeclsInPreamble.clear(); // Create a file manager object to provide access to and cache the filesystem. - Clang.setFileManager(new FileManager); + Clang.setFileManager(new FileManager(Clang.getFileSystemOpts())); // Create the source manager. Clang.setSourceManager(new SourceManager(getDiagnostics(), -- cgit v1.2.3-70-g09d2