mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[serialization] Remove FALL_BACK_TO_TRANSLATION_UNIT hack.
As a bring-up hack, the module serializer would write a special record, FALL_BACK_TO_TRANSLATION_UNIT, if it encountered something it didn't know how to serialize. This then directed the deserializer to ignore the contents of the module file and instead reload the original source file. Now that we can serialize pretty much everything*, though, we don't need this, and instead we'd rather know where the serialization coverage has gaps (by asserting). Swift SVN r7752
This commit is contained in:
@@ -50,12 +50,6 @@ enum class ModuleStatus {
|
||||
/// The module is valid.
|
||||
Valid,
|
||||
|
||||
/// The module contains pointers to source files, which should be loaded
|
||||
/// instead.
|
||||
///
|
||||
/// This is a bring-up hack and will eventually go away.
|
||||
FallBackToTranslationUnit,
|
||||
|
||||
/// The module file format is too new to be used by this version of the
|
||||
/// compiler.
|
||||
FormatTooNew,
|
||||
@@ -196,8 +190,7 @@ private:
|
||||
|
||||
/// Convenience function for module loading.
|
||||
void error(ModuleStatus issue = ModuleStatus::Malformed) {
|
||||
assert(issue != ModuleStatus::Valid &&
|
||||
issue != ModuleStatus::FallBackToTranslationUnit);
|
||||
assert(issue != ModuleStatus::Valid);
|
||||
Status = issue;
|
||||
}
|
||||
|
||||
@@ -316,8 +309,7 @@ public:
|
||||
|
||||
/// Returns paths to the source files that were used to build this module.
|
||||
ArrayRef<StringRef> getInputSourcePaths() const {
|
||||
assert(getStatus() == ModuleStatus::Valid ||
|
||||
getStatus() == ModuleStatus::FallBackToTranslationUnit);
|
||||
assert(getStatus() == ModuleStatus::Valid);
|
||||
return SourcePaths;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user