@@ -33,15 +33,18 @@ the same <substitution> the <unqualified-name> is.
33
33
34
34
They are mangled as:
35
35
36
+ .. code-block :: none
37
+
36
38
<abi-tags> ::= <abi-tag>* # sort by name
37
39
<abi-tag> ::= B <tag source-name>
38
40
39
41
Example:
40
42
43
+ .. code-block :: c++
44
+
41
45
__attribute__((abi_tag("test")))
42
46
void Func();
43
-
44
- gets mangled as: _Z4FuncB4testv (prettified as `Func[abi:test]() `)
47
+ // gets mangled as: _Z4FuncB4testv (prettified as `Func[abi:test]() `)
45
48
46
49
Active tags
47
50
===========
@@ -52,6 +55,8 @@ enum), the explicit tags are the active tags.
52
55
For variables and functions, the active tags are the explicit tags plus any
53
56
"required tags" which are not in the "available tags" set:
54
57
58
+ .. code-block :: none
59
+
55
60
derived-tags := (required-tags - available-tags)
56
61
active-tags := explicit-tags + derived-tags
57
62
@@ -68,15 +73,16 @@ Otherwise the function requires any implicit or explicit tag used in the name
68
73
for the return type.
69
74
70
75
Example:
76
+
77
+ .. code-block :: c++
78
+
71
79
namespace A {
72
80
inline namespace B __attribute__((abi_tag)) {
73
81
struct C { int x; };
74
82
}
75
83
}
76
84
77
- A::C foo();
78
-
79
- gets mangled as: _Z3fooB1Bv (prettified as `foo[abi:B]() `)
85
+ A::C foo(); // gets mangled as: _Z3fooB1Bv (prettified as `foo[abi:B]() `)
80
86
81
87
Required tags for a variable
82
88
============================
@@ -99,4 +105,3 @@ in the type of a cast operator) are NOT available.
99
105
Example: a cast operator to std::string (which is
100
106
std::__cxx11::basic_string<...>) will use 'cxx11' as an active tag, as it is
101
107
required from the return type `std::string ` but not available.
102
-
0 commit comments