Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | bool runInvocation(std::shared_ptr<CompilerInvocation> Invocation, | ||||
Scanned = true; | Scanned = true; | ||||
// Create a compiler instance to handle the actual work. | // Create a compiler instance to handle the actual work. | ||||
ScanInstanceStorage.emplace(std::move(PCHContainerOps)); | ScanInstanceStorage.emplace(std::move(PCHContainerOps)); | ||||
CompilerInstance &ScanInstance = *ScanInstanceStorage; | CompilerInstance &ScanInstance = *ScanInstanceStorage; | ||||
ScanInstance.setInvocation(std::move(Invocation)); | ScanInstance.setInvocation(std::move(Invocation)); | ||||
ScanInstance.getFrontendOpts().BuildingImplicitModuleUsesLock = false; | |||||
ScanInstance.getPreprocessorOpts().ScanningMode = true; | |||||
// Create the compiler's actual diagnostics engine. | // Create the compiler's actual diagnostics engine. | ||||
sanitizeDiagOpts(ScanInstance.getDiagnosticOpts()); | sanitizeDiagOpts(ScanInstance.getDiagnosticOpts()); | ||||
ScanInstance.createDiagnostics(DiagConsumer, /*ShouldOwnClient=*/false); | ScanInstance.createDiagnostics(DiagConsumer, /*ShouldOwnClient=*/false); | ||||
if (!ScanInstance.hasDiagnostics()) | if (!ScanInstance.hasDiagnostics()) | ||||
return false; | return false; | ||||
ScanInstance.getPreprocessorOpts().AllowPCHWithDifferentModulesCachePath = | ScanInstance.getPreprocessorOpts().AllowPCHWithDifferentModulesCachePath = | ||||
true; | true; | ||||
▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines |