diff --git a/clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h b/clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h --- a/clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h +++ b/clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h @@ -101,7 +101,7 @@ bool ImportedByMainFile = false; /// Compiler invocation that can be used to build this module (without paths). - CompilerInvocation Invocation; + CompilerInvocation BuildInvocation; /// Gets the canonical command line suitable for passing to clang. /// diff --git a/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp b/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp --- a/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp +++ b/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp @@ -84,7 +84,7 @@ std::vector ModuleDeps::getCanonicalCommandLine( std::function LookupPCMPath, std::function LookupModuleDeps) const { - CompilerInvocation CI(Invocation); + CompilerInvocation CI(BuildInvocation); FrontendOptions &FrontendOpts = CI.getFrontendOpts(); InputKind ModuleMapInputKind(FrontendOpts.DashX.getLanguage(), @@ -101,7 +101,7 @@ std::vector ModuleDeps::getCanonicalCommandLineWithoutModulePaths() const { - return serializeCompilerInvocation(Invocation); + return serializeCompilerInvocation(BuildInvocation); } void dependencies::detail::collectPCMAndModuleMapPaths( @@ -260,13 +260,13 @@ llvm::DenseSet SeenModules; addAllSubmodulePrebuiltDeps(M, MD, SeenModules); - MD.Invocation = MDC.makeInvocationForModuleBuildWithoutPaths( - MD, [&](CompilerInvocation &CI) { + MD.BuildInvocation = MDC.makeInvocationForModuleBuildWithoutPaths( + MD, [&](CompilerInvocation &BuildInvocation) { if (MDC.OptimizeArgs) - optimizeHeaderSearchOpts(CI.getHeaderSearchOpts(), + optimizeHeaderSearchOpts(BuildInvocation.getHeaderSearchOpts(), *MDC.ScanInstance.getASTReader(), *MF); }); - MD.ID.ContextHash = MD.Invocation.getModuleHash(); + MD.ID.ContextHash = MD.BuildInvocation.getModuleHash(); llvm::DenseSet AddedModules; addAllSubmoduleDeps(M, MD, AddedModules); diff --git a/clang/tools/clang-scan-deps/ClangScanDeps.cpp b/clang/tools/clang-scan-deps/ClangScanDeps.cpp --- a/clang/tools/clang-scan-deps/ClangScanDeps.cpp +++ b/clang/tools/clang-scan-deps/ClangScanDeps.cpp @@ -362,7 +362,7 @@ SmallString<256> ExplicitPCMPath( !ModuleFilesDir.empty() ? ModuleFilesDir - : MD.Invocation.getHeaderSearchOpts().ModuleCachePath); + : MD.BuildInvocation.getHeaderSearchOpts().ModuleCachePath); llvm::sys::path::append(ExplicitPCMPath, MD.ID.ContextHash, Filename); return std::string(ExplicitPCMPath); }