Skip to content

Commit 74b01d9

Browse files
committed
[Clang][ScanDeps] Pass diagnostics to getModuleHash.
rdar://58857443
1 parent 81e0a5d commit 74b01d9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ void ModuleDepCollectorPP::FileChanged(SourceLocation Loc,
6868
// This has to be delayed as the context hash can change at the start of
6969
// `CompilerInstance::ExecuteAction`.
7070
if (MDC.ContextHash.empty()) {
71-
MDC.ContextHash = Instance.getInvocation().getModuleHash();
71+
MDC.ContextHash =
72+
Instance.getInvocation().getModuleHash(Instance.getDiagnostics());
7273
MDC.Consumer.handleContextHash(MDC.ContextHash);
7374
}
7475

@@ -178,9 +179,9 @@ void ModuleDepCollectorPP::addModuleDep(
178179
for (const Module *Import : M->Imports) {
179180
if (Import->getTopLevelModule() != M->getTopLevelModule()) {
180181
if (AddedModules.insert(Import->getTopLevelModule()).second)
181-
MD.ClangModuleDeps.push_back(
182-
{Import->getTopLevelModuleName(),
183-
Instance.getInvocation().getModuleHash()});
182+
MD.ClangModuleDeps.push_back({Import->getTopLevelModuleName(),
183+
Instance.getInvocation().getModuleHash(
184+
Instance.getDiagnostics())});
184185
handleTopLevelModule(Import->getTopLevelModule());
185186
}
186187
}

0 commit comments

Comments
 (0)