Skip to content

Commit 861e2e3

Browse files
committed
SIL: add a trace for the construction of witness tables
Add an optional debug trace for the construction of Witness tables. This was helpful in diagnosing the out-of-order emission of witness tables on Windows.
1 parent c6ee1b3 commit 861e2e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/SIL/SILWitnessTable.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
//
2020
//===----------------------------------------------------------------------===//
2121

22+
#define DEBUG_TYPE "sil-witness-table"
2223
#include "swift/SIL/SILWitnessTable.h"
2324
#include "swift/AST/ASTMangler.h"
2425
#include "swift/AST/Module.h"
@@ -66,6 +67,8 @@ SILWitnessTable *SILWitnessTable::create(
6667
// Create the mangled name of our witness table...
6768
Identifier Name = M.getASTContext().getIdentifier(mangleConstant(Conformance));
6869

70+
LLVM_DEBUG(llvm::dbgs() << "SILWitnessTable Creating: " << Name.str() << '\n');
71+
6972
// Allocate the witness table and initialize it.
7073
void *buf = M.allocate(sizeof(SILWitnessTable), alignof(SILWitnessTable));
7174
SILWitnessTable *wt = ::new (buf)

0 commit comments

Comments
 (0)