Skip to content

Commit 8edd751

Browse files
committed
ASTMangler: lessen an assert to allow moving symbols down to Swift stdlib
rdar://82698574
1 parent 33b5868 commit 8edd751

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/AST/ASTMangler.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2173,8 +2173,14 @@ void ASTMangler::appendModule(const ModuleDecl *module,
21732173

21742174
// Try the special 'swift' substitution.
21752175
if (ModName == STDLIB_NAME) {
2176-
assert(useModuleName.empty());
2177-
return appendOperator("s");
2176+
if (useModuleName.empty()) {
2177+
appendOperator("s");
2178+
} else if (DWARFMangling) {
2179+
appendOperator("s");
2180+
} else {
2181+
appendIdentifier(useModuleName);
2182+
}
2183+
return;
21782184
}
21792185

21802186
if (ModName == MANGLING_MODULE_OBJC) {

0 commit comments

Comments
 (0)