File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -640,7 +640,10 @@ static void emitSwiftdepsForAllPrimaryInputsIfNeeded(
640
640
//
641
641
// FIXME: It seems more appropriate for the driver to notice the early-exit
642
642
// and react by always enqueuing the jobs it dropped in the other waves.
643
- if (Instance.getDiags ().hadAnyError ())
643
+ //
644
+ // We will output a module if allowing errors, so ignore that case.
645
+ if (Instance.getDiags ().hadAnyError () &&
646
+ !Invocation.getFrontendOptions ().AllowModuleWithCompilerErrors )
644
647
return ;
645
648
646
649
for (auto *SF : Instance.getPrimarySourceFiles ()) {
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
2
3
3
// The module should be generated regardless of errors and diagnostic should still be output
4
- // RUN: %target-swift-frontend -verify -emit-module -o %t/errors.swiftmodule -experimental-allow-module-with-compiler-errors -D ERROR_MODULE %s
4
+ // RUN: %target-swift-frontend -verify -emit-module -o %t/errors.swiftmodule -emit-reference-dependencies-path %t/errors.swiftdeps -emit-dependencies-path %t/errors.d - experimental-allow-module-with-compiler-errors -D ERROR_MODULE -primary-file %s
5
5
// RUN: llvm-bcanalyzer %t/errors.swiftmodule | %FileCheck -check-prefix=CHECK-BC %s
6
6
// CHECK-BC-NOT: UnknownCode
7
+ // RUN: ls %t/errors.swiftdeps
8
+ // RUN: ls %t/errors.d
9
+
7
10
#if ERROR_MODULE
8
11
public struct ValidStructInvalidMember {
9
12
public var member : String
You can’t perform that action at this time.
0 commit comments