mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix for emit_reference_dependencies_without_primary_file warning required after changes to introduce multiple primary files to CompilerInstance.
Revealed by test Frontend/dependencies.swift.
This commit is contained in:
@@ -734,6 +734,9 @@ static bool performCompile(CompilerInstance &Instance,
|
||||
opts);
|
||||
|
||||
if (shouldTrackReferences) {
|
||||
if (Instance.getPrimarySourceFiles().empty())
|
||||
Context.Diags.diagnose(
|
||||
SourceLoc(), diag::emit_reference_dependencies_without_primary_file);
|
||||
for (auto *SF : Instance.getPrimarySourceFiles()) {
|
||||
emitReferenceDependencies(Context.Diags, SF,
|
||||
*Instance.getDependencyTracker(), opts);
|
||||
|
||||
Reference in New Issue
Block a user