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
10 changes: 5 additions & 5 deletions clang/include/clang/DependencyScanning/DependencyScannerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ class DependencyScanningAction {
std::unique_ptr<DiagnosticOptions>
createDiagOptions(ArrayRef<std::string> CommandLine);

struct DignosticsEngineWithDiagOpts {
struct DiagnosticsEngineWithDiagOpts {
// We need to bound the lifetime of the DiagOpts used to create the
// DiganosticsEngine with the DiagnosticsEngine itself.
std::unique_ptr<DiagnosticOptions> DiagOpts;
IntrusiveRefCntPtr<DiagnosticsEngine> DiagEngine;

DignosticsEngineWithDiagOpts(ArrayRef<std::string> CommandLine,
IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS,
DiagnosticConsumer &DC);
DiagnosticsEngineWithDiagOpts(ArrayRef<std::string> CommandLine,
IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS,
DiagnosticConsumer &DC);
};

struct TextDiagnosticsPrinterWithOutput {
Expand Down Expand Up @@ -151,7 +151,7 @@ class CompilerInstanceWithContext {
// DiagConsumer may points to DiagPrinterWithOS->DiagPrinter, or a custom
// DiagnosticConsumer passed in from initialize.
DiagnosticConsumer *DiagConsumer = nullptr;
std::unique_ptr<DignosticsEngineWithDiagOpts> DiagEngineWithCmdAndOpts;
std::unique_ptr<DiagnosticsEngineWithDiagOpts> DiagEngineWithCmdAndOpts;

// Context - compiler invocation
// Compilation's command's arguments may be owned by Alloc when expanded from
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/DependencyScanning/DependencyScannerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ dependencies::createDiagOptions(ArrayRef<std::string> CommandLine) {
return DiagOpts;
}

DignosticsEngineWithDiagOpts::DignosticsEngineWithDiagOpts(
DiagnosticsEngineWithDiagOpts::DiagnosticsEngineWithDiagOpts(
ArrayRef<std::string> CommandLine,
IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS, DiagnosticConsumer &DC) {
std::vector<const char *> CCommandLine(CommandLine.size(), nullptr);
Expand Down Expand Up @@ -725,7 +725,7 @@ bool CompilerInstanceWithContext::initialize(DiagnosticConsumer *DC) {
std::tie(OverlayFS, CommandLine) = initVFSForByNameScanning(
Worker.DepFS, CommandLine, CWD, "ScanningByName");

DiagEngineWithCmdAndOpts = std::make_unique<DignosticsEngineWithDiagOpts>(
DiagEngineWithCmdAndOpts = std::make_unique<DiagnosticsEngineWithDiagOpts>(
CommandLine, OverlayFS, *DiagConsumer);

std::tie(Driver, Compilation) = buildCompilation(
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/DependencyScanning/DependencyScanningWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ bool DependencyScanningWorker::scanDependencies(
FS = std::move(OverlayFS);
}

DignosticsEngineWithDiagOpts DiagEngineWithCmdAndOpts(CommandLine, FS, DC);
DiagnosticsEngineWithDiagOpts DiagEngineWithCmdAndOpts(CommandLine, FS, DC);
DependencyScanningAction Action(Service, WorkingDirectory, Consumer,
Controller, DepFS);

Expand Down
Loading