Commit Graph

12 Commits

Author SHA1 Message Date
Alastair Houghton
145f2814a2 [Demangling][Tests] Fix tests after remangler initial error handling.
Fix the tests to work after the Remangler has been fixed to do error handling.

rdar://79725187
2021-09-06 17:49:09 +01:00
Alastair Houghton
52ec3d195a Merge branch 'main' into problem/63678072 2021-07-07 07:15:22 +01:00
Alastair Houghton
779b10daeb [Demangler] Fix OldRemangler's handling of Subscript nodes.
The Subscript node isn't laid-out the way the code in OldRemangler thinks,
which has the unfortunate result of causing crashes.

rdar://63410196
2021-07-02 11:40:20 +01:00
Alastair Houghton
226c36e861 Merge branch 'main' into problem/63678171 2021-06-25 11:36:55 +01:00
Alastair Houghton
d57cedd7d8 Merge branch 'main' into problem/63678072 2021-06-25 11:36:26 +01:00
Alastair Houghton
4661deba27 [Demangler] Fix for crash in mangleSingleChildNode.
PartialApplyForwarders can apparently have no children in some cases,
so avoid calling mangleSingleChildNode() if that happens in order to avoid
a crash.

rdar://63678141
2021-06-21 15:51:35 +01:00
Alastair Houghton
35db37f941 [Demangler] Fix OldRemangler to cope with Type nodes in a couple of places.
The Demangler can wrap types in a Node::Kind::Type node; these need to be
handled by following the node's first child pointer.  Failing to do this led to
a crash or assertion failure in some cases.

rdar://63678171
2021-06-21 10:19:24 +01:00
Alastair Houghton
d70e93b92e [Demangler] Fix OldRemangler to cope with single argument functions.
The Demangler can sometimes output ArgumentTuples containing a single argument
without placing that argument inside a Tuple node.  OldRemangler failed to take
account of this and either crashed or failed with an assertion failure depending
on whether assertions were enabled or not.

rdar://63678072
2021-06-19 10:20:02 +01:00
Doug Gregor
cfc0f892e3 [Mangle] Include generic arguments of extensions for the Objective-C runtime
The remangler for the Objective-C runtime was dropping generic arguments
of extension contents, leading to collisions with @objc class names.
Include the generic arguments of extensions.

Fixes rdar://problem/45956357.
2018-11-26 13:51:40 -08:00
Erik Eckstein
39bb14b094 change mangling prefix from $S to $s
This is the final ABI mangling prefix

rdar://problem/38471478
2018-09-19 13:55:11 -07:00
Erik Eckstein
5acd7edcdf Fix a runtime crash in the old remangler when trying to create a mangling for a private type in the Swift library
rdar://problem/36889992
2018-01-29 16:25:38 -08:00
John McCall
a0d3214e4c Test that the remangler round-trips successfully.
To get this to work, delay some "cleanup" work in the
demangler.  For example, we now preserve in the tree
whether something was mangled as an allocating
initializer, and we only special-case the class vs.
non-class cases in the pretty printer.

Also fixes a number of remangling bugs, of course.

Swift SVN r24534
2015-01-19 23:12:58 +00:00