mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Diagnose when trying to import non-ossa module to ossa when implicit modules are disabled
This commit is contained in:
@@ -901,6 +901,9 @@ ERROR(serialization_target_too_new_repl,none,
|
||||
"deployment target of %0 %3: %4",
|
||||
(StringRef, llvm::VersionTuple, Identifier, llvm::VersionTuple,
|
||||
StringRef))
|
||||
ERROR(serialization_non_ossa_module_incompatible, Fatal,
|
||||
"cannot import non-OSSA module into an OSSA module",
|
||||
(Identifier))
|
||||
|
||||
ERROR(serialization_fatal,Fatal,
|
||||
"fatal error encountered while reading from module '%0'; "
|
||||
|
||||
@@ -1190,7 +1190,12 @@ void swift::serialization::diagnoseSerializedASTLoadFailure(
|
||||
moduleBufferID);
|
||||
break;
|
||||
case serialization::Status::NotInOSSA:
|
||||
// soft reject, silently ignore.
|
||||
// Diagnose only when explicit build modules is enabled
|
||||
if (Ctx.SerializationOpts.ExplicitModuleBuild) {
|
||||
Ctx.Diags.diagnose(diagLoc,
|
||||
diag::serialization_non_ossa_module_incompatible,
|
||||
ModuleName);
|
||||
}
|
||||
break;
|
||||
case serialization::Status::RevisionIncompatible:
|
||||
Ctx.Diags.diagnose(diagLoc, diag::serialization_module_incompatible_revision,
|
||||
|
||||
Reference in New Issue
Block a user