Skip to content

Commit 56a3270

Browse files
committed
Instead of linking libswiftAST into SwiftBasicTests, define ActorIsolation::dumpForDiagnostics out of line.
1 parent 0445a85 commit 56a3270

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

include/swift/AST/ActorIsolation.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@ class ActorIsolation {
291291
llvm::dbgs() << '\n';
292292
}
293293

294-
SWIFT_DEBUG_DUMPER(dumpForDiagnostics()) {
295-
printForDiagnostics(llvm::dbgs());
296-
llvm::dbgs() << '\n';
297-
}
294+
// Defined out of line to prevent linker errors since libswiftBasic would
295+
// include this header exascerbating a layering violation where libswiftBasic
296+
// depends on libswiftAST.
297+
SWIFT_DEBUG_DUMPER(dumpForDiagnostics());
298298
};
299299

300300
/// Determine how the given value declaration is isolated.

lib/AST/TypeCheckRequests.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,6 +1716,11 @@ void ActorIsolation::printForDiagnostics(llvm::raw_ostream &os,
17161716
}
17171717
}
17181718

1719+
void ActorIsolation::dumpForDiagnostics() const {
1720+
printForDiagnostics(llvm::dbgs());
1721+
llvm::dbgs() << '\n';
1722+
}
1723+
17191724
void swift::simple_display(
17201725
llvm::raw_ostream &out, const ActorIsolation &state) {
17211726
if (state.preconcurrency())

0 commit comments

Comments
 (0)