diff options
Diffstat (limited to 'clang/lib/Tooling')
-rw-r--r-- | clang/lib/Tooling/DependencyScanning/DependencyScannerImpl.cpp | 11 | ||||
-rw-r--r-- | clang/lib/Tooling/Tooling.cpp | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/Tooling/DependencyScanning/DependencyScannerImpl.cpp b/clang/lib/Tooling/DependencyScanning/DependencyScannerImpl.cpp index 66cf2688..010380d 100644 --- a/clang/lib/Tooling/DependencyScanning/DependencyScannerImpl.cpp +++ b/clang/lib/Tooling/DependencyScanning/DependencyScannerImpl.cpp @@ -415,7 +415,7 @@ bool DependencyScanningAction::runInvocation( any(Service.getOptimizeArgs() & ScanningOptimizations::VFS); // Create a new FileManager to match the invocation's FileSystemOptions. - auto *FileMgr = ScanInstance.createFileManager(); + ScanInstance.createFileManager(); // Use the dependency scanning optimized file system if requested to do so. if (DepFS) { @@ -423,16 +423,17 @@ bool DependencyScanningAction::runInvocation( if (!ScanInstance.getHeaderSearchOpts().ModuleCachePath.empty()) { SmallString<256> ModulesCachePath; normalizeModuleCachePath( - *FileMgr, ScanInstance.getHeaderSearchOpts().ModuleCachePath, - ModulesCachePath); + ScanInstance.getFileManager(), + ScanInstance.getHeaderSearchOpts().ModuleCachePath, ModulesCachePath); DepFS->setBypassedPathPrefix(ModulesCachePath); } ScanInstance.setDependencyDirectivesGetter( - std::make_unique<ScanningDependencyDirectivesGetter>(*FileMgr)); + std::make_unique<ScanningDependencyDirectivesGetter>( + ScanInstance.getFileManager())); } - ScanInstance.createSourceManager(*FileMgr); + ScanInstance.createSourceManager(); // Create a collection of stable directories derived from the ScanInstance // for determining whether module dependencies would fully resolve from diff --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp index 2d4790b..ea5a372 100644 --- a/clang/lib/Tooling/Tooling.cpp +++ b/clang/lib/Tooling/Tooling.cpp @@ -458,7 +458,7 @@ bool FrontendActionFactory::runInvocation( if (!Compiler.hasDiagnostics()) return false; - Compiler.createSourceManager(*Files); + Compiler.createSourceManager(); const bool Success = Compiler.ExecuteAction(*ScopedToolAction); |