Skip to content

Commit 98494bb

Browse files
authored
Merge pull request #30316 from akyrtzi/parser-lib-fix-linker-error
2 parents 685d35b + 21e1fc4 commit 98494bb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/AST/ASTMangler.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ std::string ASTMangler::mangleTypeAsUSR(Type Ty) {
520520

521521
std::string ASTMangler::mangleDeclAsUSR(const ValueDecl *Decl,
522522
StringRef USRPrefix) {
523+
#if SWIFT_BUILD_ONLY_SYNTAXPARSERLIB
524+
return std::string(); // not needed for the parser library.
525+
#endif
526+
523527
DWARFMangling = true;
524528
beginManglingWithoutPrefix();
525529
llvm::SaveAndRestore<bool> allowUnnamedRAII(AllowNamelessEntities, true);

0 commit comments

Comments
 (0)