-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Introduce special decl names #9989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -540,8 +540,15 @@ void ASTMangler::appendDeclName(const ValueDecl *decl) { | |
break; | ||
} | ||
} else if (decl->hasName()) { | ||
// TODO: Handle special names | ||
appendIdentifier(decl->getBaseName().getIdentifier().str()); | ||
// FIXME: Should a mangled subscript name contain the string "subscript"? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something @eeckstein may have an opinion on, but can be changed in a follow-up commit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to start a thread about that once the changes have been landed |
||
switch (decl->getBaseName().getKind()) { | ||
case DeclBaseName::Kind::Normal: | ||
appendIdentifier(decl->getBaseName().getIdentifier().str()); | ||
break; | ||
case DeclBaseName::Kind::Subscript: | ||
appendIdentifier("subscript"); | ||
break; | ||
} | ||
} else { | ||
assert(AllowNamelessEntities && "attempt to mangle unnamed decl"); | ||
// Fall back to an unlikely name, so that we still generate a valid | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉