@@ -749,8 +749,8 @@ Mangled names conform to the following grammar:
749
749
<instantiating-crate> = <path>
750
750
751
751
// There are no restrictions on the characters that may be used
752
- // in the suffix following the `.`.
753
- <vendor-specific-suffix> = "." <suffix>
752
+ // in the suffix following the `.` or `$` .
753
+ <vendor-specific-suffix> = ( "." | "$") <suffix>
754
754
```
755
755
756
756
### Namespace Tags
@@ -809,12 +809,13 @@ like regular identifiers and need no further special handling.
809
809
### Vendor-specific suffix
810
810
811
811
Similarly to the [ Itanium C++ ABI mangling scheme] [ itanium-mangling-structure ] , a symbol name
812
- containing a period (` . ` ) represents a vendor-specific version of the symbol. There are no
813
- restrictions on the characters following the period.
812
+ containing a period (` . ` ) or a dollar sign ( ` $ ` ) represents a vendor-specific version of the symbol.
813
+ There are no restrictions on the characters following the period or dollar sign .
814
814
815
815
This can happen in practice when locally unique names needed to become globally unique. For example,
816
- LLVM can append a ` .llvm.<numbers> ` suffix during LTO to ensure a unique name. In these situations
817
- it's generally fine to ignore the suffix: the suffixed name has the same semantics as the original.
816
+ LLVM can append a ` .llvm.<numbers> ` suffix during LTO to ensure a unique name, and ` $ ` can be used
817
+ for thread-local data on Mach-O. In these situations it's generally fine to ignore the suffix: the
818
+ suffixed name has the same semantics as the original.
818
819
819
820
[ itanium-mangling-structure ] : https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-structure
820
821
0 commit comments