Skip to content

Basic: add a comment about the "complex" code #27999

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

Merged
merged 1 commit into from
Nov 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/swift/Basic/Mangler.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ class Mangler {
/// Appends a mangled identifier string.
void appendIdentifier(StringRef ident);

// NOTE: the addSubsitution functions perform the value computation before
// the assignment because there is no sequence point synchronising the
// computation of the value before the insertion of the new key, resulting in
// the computed value being off-by-one causing an undecoration failure during
// round-tripping.
void addSubstitution(const void *ptr) {
if (!UseSubstitutions)
return;
Expand Down