Skip to content

Commit 748a066

Browse files
committed
Update Mangling.rst for new sugared type manglings
1 parent c862253 commit 748a066

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/ABI/Mangling.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@ Types
396396
any-generic-type ::= context decl-name 'V' // nominal struct type
397397
any-generic-type ::= context decl-name 'XY' // unknown nominal type
398398
any-generic-type ::= protocol 'P' // nominal protocol type
399-
any-generic-type ::= context decl-name 'a' // typealias type (used in DWARF and USRs)
400399

401400
any-generic-type ::= standard-substitutions
402401

@@ -604,6 +603,17 @@ The number of parameters and results must match with the number of
604603
``<FUNC-REPRESENTATION>``.
605604
The ``<generic-signature>`` is used if the function is polymorphic.
606605

606+
DWARF debug info and USRs also mangle sugared types, adding the following
607+
productions:
608+
609+
::
610+
611+
any-generic-type ::= context decl-name 'a' // typealias type
612+
type ::= base-type "XSq" // sugared Optional type
613+
type ::= base-type "XSa" // sugared Array type
614+
type ::= key-type value-type "XSD" // sugared Dictionary type
615+
type ::= base-type "XSp" // sugared Paren type
616+
607617
Generics
608618
~~~~~~~~
609619

0 commit comments

Comments
 (0)