Skip to content

Commit 80208d6

Browse files
committed
Instead of linking libswiftAST into SwiftBasicTests, define ActorIsolation::dumpForDiagnostics out of line.
(cherry picked from commit 56a3270)
1 parent 5ca0f27 commit 80208d6

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
@@ -1705,6 +1705,11 @@ void ActorIsolation::printForDiagnostics(llvm::raw_ostream &os,
17051705
}
17061706
}
17071707

1708+
void ActorIsolation::dumpForDiagnostics() const {
1709+
printForDiagnostics(llvm::dbgs());
1710+
llvm::dbgs() << '\n';
1711+
}
1712+
17081713
void swift::simple_display(
17091714
llvm::raw_ostream &out, const ActorIsolation &state) {
17101715
if (state.preconcurrency())

0 commit comments

Comments
 (0)