Skip to content

Commit e45574e

Browse files
authored
Merge pull request #27999 from compnerd/documentation
Basic: add a comment about the "complex" code
2 parents f973e15 + dae4f20 commit e45574e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/swift/Basic/Mangler.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ class Mangler {
124124
/// Appends a mangled identifier string.
125125
void appendIdentifier(StringRef ident);
126126

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

0 commit comments

Comments
 (0)