[Serialization] Fix one PrettyStackTrace, add another. (#7436)

We want to see /what/ types are failing here.
This commit is contained in:
Jordan Rose
2017-02-13 16:42:14 -08:00
committed by GitHub
parent a4904befd6
commit 54be4e17ca
2 changed files with 5 additions and 2 deletions

View File

@@ -20,8 +20,8 @@
#include "swift/AST/GenericEnvironment.h"
#include "swift/AST/Initializer.h"
#include "swift/AST/LinkLibrary.h"
#include "swift/AST/PrettyStackTrace.h"
#include "swift/AST/ProtocolConformance.h"
#include "swift/AST/ASTMangler.h"
#include "swift/AST/RawComment.h"
#include "swift/AST/USRGeneration.h"
#include "swift/Basic/Dwarf.h"
@@ -465,7 +465,10 @@ TypeID Serializer::addTypeRef(Type ty) {
if (!ty)
return 0;
#ifndef NDEBUG
PrettyStackTraceType trace(M->getASTContext(), "serializing", ty);
assert(!ty->hasError() && "Serializing error type");
#endif
auto &id = DeclAndTypeIDs[ty];
if (id.first != 0)