mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[serialization] Sprinkle PrettyStackTrace throughout deserialization code.
Since we don't have soft-failure yet from deserialization, it's helpful to at least know where to start looking when something crashes. There are some rough edges here but it should be much better than nothing. This also pulls the list of record nodes out into a separate file, so that we can avoid repeating it. Example crash: 1. While reading from ./CTypes.swiftmodule 2. While deserializing 'CBool' (StructDecl) 3. While deserializing decl #26 (XREF) 4. Cross-reference to 'LogicValue' in swift (don't worry, this is an example where I'm tweaking things) <rdar://problem/14838332> Swift SVN r11057
This commit is contained in:
@@ -180,6 +180,8 @@ private:
|
||||
/// Convenience function for module loading.
|
||||
void error(ModuleStatus issue = ModuleStatus::Malformed) {
|
||||
assert(issue != ModuleStatus::Valid);
|
||||
assert((!FileContext || issue != ModuleStatus::Malformed) &&
|
||||
"error deserializing an individual record");
|
||||
Status = issue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user