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(
640640 //
641641 // FIXME: It seems more appropriate for the driver to notice the early-exit
642642 // 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 )
644647 return ;
645648
646649 for (auto *SF : Instance.getPrimarySourceFiles ()) {
Original file line number Diff line number Diff line change 11// RUN: %empty-directory(%t)
22
33// 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
55// RUN: llvm-bcanalyzer %t/errors.swiftmodule | %FileCheck -check-prefix=CHECK-BC %s
66// CHECK-BC-NOT: UnknownCode
7+ // RUN: ls %t/errors.swiftdeps
8+ // RUN: ls %t/errors.d
9+
710#if ERROR_MODULE
811public struct ValidStructInvalidMember {
912 public var member : String
You can’t perform that action at this time.
0 commit comments