Skip to content

Commit a35fb58

Browse files
authored
Merge pull request #7371 from jrose-apple/asserts-catch-bugs-or-so-i-hope
2 parents 41a0f6d + 509354f commit a35fb58

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Serialization/Deserialization.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ namespace {
8888
os << IDAndKind{DeclOrOffset.get(), ID};
8989
}
9090
}
91-
os << "in '" << getNameOfModule(MF) << "'\n";
91+
os << " in '" << getNameOfModule(MF) << "'\n";
9292
}
9393
};
9494

@@ -4330,6 +4330,11 @@ Type ModuleFile::getType(TypeID TID) {
43304330
return nullptr;
43314331
}
43324332

4333+
#ifndef NDEBUG
4334+
PrettyStackTraceType(ctx, "deserializing", typeOrOffset.get());
4335+
assert(!typeOrOffset.get()->hasError());
4336+
#endif
4337+
43334338
// Invoke the callback on the deserialized type.
43344339
DeserializedTypeCallback(typeOrOffset);
43354340

0 commit comments

Comments
 (0)