Skip to content

Commit 56bab66

Browse files
authored
Merge pull request #34187 from akyrtzi/parser-lib-build-fix-link-errors
[AST] Fix linker errors with the parser-only build
2 parents 515f0db + 7372705 commit 56bab66

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/AST/Decl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ const clang::Module *ClangNode::getClangModule() const {
119119
}
120120

121121
void ClangNode::dump() const {
122+
#if SWIFT_BUILD_ONLY_SYNTAXPARSERLIB
123+
return; // not needed for the parser library.
124+
#endif
125+
122126
if (auto D = getAsDecl())
123127
D->dump();
124128
else if (auto M = getAsMacro())

lib/AST/ExtInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ Optional<UnexpectedClangTypeError> UnexpectedClangTypeError::checkClangType(
9292
}
9393

9494
void UnexpectedClangTypeError::dump() {
95+
#if SWIFT_BUILD_ONLY_SYNTAXPARSERLIB
96+
return; // not needed for the parser library.
97+
#endif
98+
9599
auto &e = llvm::errs();
96100
using Kind = UnexpectedClangTypeError::Kind;
97101
switch (errorKind) {

0 commit comments

Comments
 (0)