Skip to content

Commit 54d5191

Browse files
committed
Replace hardcoded special names with call into getUserfacingName()
This fixes an assertion failure when encountering previously unhandled special names. rdar://110841130
1 parent 7143203 commit 54d5191

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -569,14 +569,8 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
569569
if (FuncDecl *FD = L.getAsASTNode<FuncDecl>())
570570
return getName(*FD);
571571

572-
if (L.isASTNode<ConstructorDecl>())
573-
return "init";
574-
575-
if (L.isASTNode<DestructorDecl>())
576-
return "deinit";
577-
578572
if (ValueDecl *D = L.getAsASTNode<ValueDecl>())
579-
return D->getBaseIdentifier().str();
573+
return D->getBaseName().userFacingName();
580574

581575
if (auto *D = L.getAsASTNode<MacroExpansionDecl>())
582576
return D->getMacroName().getBaseIdentifier().str();

0 commit comments

Comments
 (0)