Skip to content

Commit 55caa0d

Browse files
authored
Merge pull request swiftlang#40762 from ahoppen/pr/build-clangast-for-parserlib
[SwiftSyntax] Avoid linking clangAST in SwiftSyntaxParserLib build
2 parents f09752a + eecb741 commit 55caa0d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/AST/DiagnosticEngine.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,10 @@ static bool isMainActor(Type type) {
570570

571571
void swift::printClangDeclName(const clang::NamedDecl *ND,
572572
llvm::raw_ostream &os) {
573+
#if SWIFT_BUILD_ONLY_SYNTAXPARSERLIB
574+
return; // not needed for the parser library.
575+
#endif
576+
573577
ND->getNameForDiagnostic(os, ND->getASTContext().getPrintingPolicy(), false);
574578
}
575579

0 commit comments

Comments
 (0)