Skip to content

Commit a322fd9

Browse files
committed
Serialization: remove the IS_OSSA flag from the module file header
1 parent 2f124cf commit a322fd9

File tree

12 files changed

+1
-39
lines changed

12 files changed

+1
-39
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -958,9 +958,6 @@ ERROR(serialization_target_too_new_repl,none,
958958
"deployment target of %0 %3: %4",
959959
(StringRef, llvm::VersionTuple, Identifier, llvm::VersionTuple,
960960
StringRef))
961-
ERROR(serialization_non_ossa_module_incompatible, Fatal,
962-
"cannot import non-OSSA module into an OSSA module",
963-
(Identifier))
964961

965962
ERROR(serialization_fatal,Fatal,
966963
"fatal error encountered while reading from module '%0'; "

include/swift/Serialization/SerializationOptions.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ class SerializationOptions {
162162
bool StaticLibrary = false;
163163
bool HermeticSealAtLink = false;
164164
bool EmbeddedSwiftModule = false;
165-
bool IsOSSA = false;
166165
bool SkipNonExportableDecls = false;
167166
bool ExplicitModuleBuild = false;
168167
bool EnableSerializationRemarks = false;

include/swift/Serialization/Validation.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ enum class Status {
5151
/// The distribution channel doesn't match.
5252
ChannelIncompatible,
5353

54-
/// The module is required to be in OSSA, but is not.
55-
NotInOSSA,
56-
5754
/// The module file depends on another module that can't be loaded.
5855
MissingDependency,
5956

lib/DriverTool/sil_func_extractor_main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ int sil_func_extractor_main(ArrayRef<const char *> argv, void *MainAddr) {
361361
serializationOpts.OutputPath = OutputFile;
362362
serializationOpts.SerializeAllSIL = true;
363363
serializationOpts.IsSIB = true;
364-
serializationOpts.IsOSSA = true;
365364

366365
symbolgraphgen::SymbolGraphOptions symbolGraphOpts;
367366

lib/DriverTool/sil_opt_main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,6 @@ int sil_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
10811081
serializationOpts.OutputPath = OutputFile;
10821082
serializationOpts.SerializeAllSIL = options.EmitSIB;
10831083
serializationOpts.IsSIB = options.EmitSIB;
1084-
serializationOpts.IsOSSA = true;
10851084

10861085
symbolgraphgen::SymbolGraphOptions symbolGraphOptions;
10871086

lib/Frontend/Frontend.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,6 @@ SerializationOptions CompilerInvocation::computeSerializationOptions(
281281
serializationOpts.SerializeDebugInfoSIL = true;
282282
}
283283

284-
serializationOpts.IsOSSA = true;
285-
286284
serializationOpts.SkipNonExportableDecls =
287285
getLangOptions().SkipNonExportableDecls;
288286

lib/Frontend/ModuleInterfaceBuilder.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ std::error_code ExplicitModuleInterfaceBuilder::buildSwiftModuleFromInterface(
310310
return std::make_error_code(std::errc::not_supported);
311311
SerializationOpts.Dependencies = Deps;
312312
}
313-
SerializationOpts.IsOSSA = true;
314313

315314
SILMod->setSerializeSILAction([&]() {
316315
// We don't want to serialize module docs in the cache -- they

lib/FrontendTool/FrontendTool.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,6 @@ static bool serializeSIB(SILModule *SM, const PrimarySpecificPaths &PSPs,
17541754
serializationOpts.OutputPath = moduleOutputPath;
17551755
serializationOpts.SerializeAllSIL = true;
17561756
serializationOpts.IsSIB = true;
1757-
serializationOpts.IsOSSA = true;
17581757

17591758
symbolgraphgen::SymbolGraphOptions symbolGraphOptions;
17601759

lib/Serialization/ModuleFileSharedCore.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,6 @@ static ValidationInfo validateControlBlock(
483483
}
484484
break;
485485
}
486-
case control_block::IS_OSSA: {
487-
auto isModuleInOSSA = scratch[0];
488-
if (!isModuleInOSSA)
489-
result.status = Status::NotInOSSA;
490-
break;
491-
}
492486
default:
493487
// Unknown metadata record, possibly for use by a future version of the
494488
// module format.
@@ -592,7 +586,6 @@ std::string serialization::StatusToString(Status S) {
592586
case Status::FormatTooNew: return "FormatTooNew";
593587
case Status::RevisionIncompatible: return "RevisionIncompatible";
594588
case Status::ChannelIncompatible: return "ChannelIncompatible";
595-
case Status::NotInOSSA: return "NotInOSSA";
596589
case Status::MissingDependency: return "MissingDependency";
597590
case Status::MissingUnderlyingModule: return "MissingUnderlyingModule";
598591
case Status::CircularDependency: return "CircularDependency";

lib/Serialization/ModuleFormat.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
5858
/// describe what change you made. The content of this comment isn't important;
5959
/// it just ensures a conflict if two people change the module format.
6060
/// Don't worry about adhering to the 80-column limit for this line.
61-
const uint16_t SWIFTMODULE_VERSION_MINOR = 961; // borrow/mutate accessors
61+
const uint16_t SWIFTMODULE_VERSION_MINOR = 962; // remove IS_OSSA flag from header
6262

6363
/// A standard hash seed used for all string hashes in a serialized module.
6464
///
@@ -905,7 +905,6 @@ namespace control_block {
905905
TARGET,
906906
SDK_NAME,
907907
REVISION,
908-
IS_OSSA,
909908
ALLOWABLE_CLIENT_NAME,
910909
CHANNEL,
911910
SDK_VERSION,
@@ -944,11 +943,6 @@ namespace control_block {
944943
BCBlob
945944
>;
946945

947-
using IsOSSALayout = BCRecordLayout<
948-
IS_OSSA,
949-
BCFixed<1>
950-
>;
951-
952946
using AllowableClientLayout = BCRecordLayout<
953947
ALLOWABLE_CLIENT_NAME,
954948
BCBlob

0 commit comments

Comments
 (0)