Skip to content

Commit 88aa93b

Browse files
committed
SILGen: Add PrettyStackTraces for witness table emission
1 parent 3065843 commit 88aa93b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/SILGen/SILGenType.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "swift/AST/ASTMangler.h"
2525
#include "swift/AST/GenericEnvironment.h"
2626
#include "swift/AST/ProtocolConformance.h"
27+
#include "swift/AST/PrettyStackTrace.h"
2728
#include "swift/AST/SubstitutionMap.h"
2829
#include "swift/AST/TypeMemberVisitor.h"
2930
#include "swift/SIL/FormalLinkage.h"
@@ -410,6 +411,10 @@ class SILGenConformance : public SILGenWitnessTable<SILGenConformance> {
410411
if (!Conformance)
411412
return nullptr;
412413

414+
PrettyStackTraceConformance trace(SGM.getASTContext(),
415+
"generating SIL witness table",
416+
Conformance);
417+
413418
auto *proto = Conformance->getProtocol();
414419
visitProtocolDecl(proto);
415420

@@ -773,6 +778,10 @@ class SILGenSelfConformanceWitnessTable
773778
}
774779

775780
void emit() {
781+
PrettyStackTraceConformance trace(SGM.getASTContext(),
782+
"generating SIL witness table",
783+
conformance);
784+
776785
// Add entries for all the requirements.
777786
visitProtocolDecl(conformance->getProtocol());
778787

0 commit comments

Comments
 (0)