Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions clang/lib/DependencyScanning/DependencyScanningWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,11 @@ bool DependencyScanningWorker::computeDependencies(

bool DependencyScanningWorker::initializeCompilerInstanceWithContext(
StringRef CWD, ArrayRef<std::string> CommandLine, DiagnosticConsumer &DC) {
auto OverlayFSAndArgs =
auto [OverlayFS, ModifiedCommandLine] =
initVFSForByNameScanning(DepFS, CommandLine, CWD, "ScanningByName");
auto &OverlayFS = OverlayFSAndArgs.first;
const auto &ModifiedCommandLine = OverlayFSAndArgs.second;

auto DiagEngineWithCmdAndOpts =
std::make_unique<DiagnosticsEngineWithDiagOpts>(ModifiedCommandLine,
OverlayFS, DC);

return initializeCompilerInstanceWithContext(
CWD, ModifiedCommandLine, std::move(DiagEngineWithCmdAndOpts), OverlayFS);
}
Expand Down
5 changes: 1 addition & 4 deletions clang/lib/Tooling/DependencyScanningTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,8 @@ DependencyScanningTool::initializeCompilerInstanceWithContextOrError(
// The input command line is either a driver-style command line, or
// ill-formed. In this case, we will first call the Driver to build a -cc1
// command line for this compilation or diagnose any ill-formed input.
auto OverlayFSAndArgs = initVFSForByNameScanning(
auto [OverlayFS, ModifiedCommandLine] = initVFSForByNameScanning(
&Worker.getVFS(), CommandLine, CWD, "ScanningByName");
auto &OverlayFS = OverlayFSAndArgs.first;
const auto &ModifiedCommandLine = OverlayFSAndArgs.second;

auto DiagEngineWithCmdAndOpts =
std::make_unique<DiagnosticsEngineWithDiagOpts>(
ModifiedCommandLine, OverlayFS, DiagPrinterWithOS->DiagPrinter);
Expand Down
Loading