mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Serialization] If we fail to deserialize a type, dump it.
...rather than just printing it, which isn't giving us enough info. In pursuit of rdar://problem/30382791.
This commit is contained in:
@@ -4240,7 +4240,11 @@ Type ModuleFile::getType(TypeID TID) {
|
||||
|
||||
#ifndef NDEBUG
|
||||
PrettyStackTraceType trace(ctx, "deserializing", typeOrOffset.get());
|
||||
assert(!typeOrOffset.get()->hasError());
|
||||
if (typeOrOffset.get()->hasError()) {
|
||||
typeOrOffset.get()->dump();
|
||||
llvm_unreachable("deserialization produced an invalid type "
|
||||
"(rdar://problem/30382791)");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Invoke the callback on the deserialized type.
|
||||
|
||||
Reference in New Issue
Block a user