1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
| ; These tests are based on clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
; RUN: llvm-undname < %s | FileCheck %s
; CHECK-NOT: Invalid mangled name
?f@@3V?$C@H@@A
; CHECK: class C<int> f
??0?$Class@VTypename@@@@QAE@XZ
; CHECK: __thiscall Class<class Typename>::Class<class Typename>(void)
??0?$Class@VTypename@@@@QEAA@XZ
; CHECK: __cdecl Class<class Typename>::Class<class Typename>(void)
??0?$Class@$$CBVTypename@@@@QAE@XZ
; CHECK: __thiscall Class<class Typename const>::Class<class Typename const>(void)
??0?$Class@$$CBVTypename@@@@QEAA@XZ
; CHECK: __cdecl Class<class Typename const>::Class<class Typename const>(void)
??0?$Class@$$CCVTypename@@@@QAE@XZ
; CHECK: __thiscall Class<class Typename volatile>::Class<class Typename volatile>(void)
??0?$Class@$$CCVTypename@@@@QEAA@XZ
; CHECK: __cdecl Class<class Typename volatile>::Class<class Typename volatile>(void)
??0?$Class@$$CDVTypename@@@@QAE@XZ
; CHECK: __thiscall Class<class Typename const volatile>::Class<class Typename const volatile>(void)
??0?$Class@$$CDVTypename@@@@QEAA@XZ
; CHECK: __cdecl Class<class Typename const volatile>::Class<class Typename const volatile>(void)
??0?$Class@V?$Nested@VTypename@@@@@@QAE@XZ
; CHECK: __thiscall Class<class Nested<class Typename>>::Class<class Nested<class Typename>>(void)
??0?$Class@V?$Nested@VTypename@@@@@@QEAA@XZ
; CHECK: __cdecl Class<class Nested<class Typename>>::Class<class Nested<class Typename>>(void)
??0?$Class@QAH@@QAE@XZ
; CHECK: __thiscall Class<int *const>::Class<int *const>(void)
??0?$Class@QEAH@@QEAA@XZ
; CHECK: __cdecl Class<int *const>::Class<int *const>(void)
??0?$Class@$$A6AHXZ@@QAE@XZ
; CHECK: __thiscall Class<int __cdecl(void)>::Class<int __cdecl(void)>(void)
??0?$Class@$$A6AHXZ@@QEAA@XZ
; CHECK: __cdecl Class<int __cdecl(void)>::Class<int __cdecl(void)>(void)
??0?$Class@$$BY0A@H@@QAE@XZ
; CHECK: __thiscall Class<int[]>::Class<int[]>(void)
??0?$Class@$$BY0A@H@@QEAA@XZ
; CHECK: __cdecl Class<int[]>::Class<int[]>(void)
??0?$Class@$$BY04H@@QAE@XZ
; CHECK: __thiscall Class<int[5]>::Class<int[5]>(void)
??0?$Class@$$BY04H@@QEAA@XZ
; CHECK: __cdecl Class<int[5]>::Class<int[5]>(void)
??0?$Class@$$BY04$$CBH@@QAE@XZ
; CHECK: __thiscall Class<int const[5]>::Class<int const[5]>(void)
??0?$Class@$$BY04$$CBH@@QEAA@XZ
; CHECK: __cdecl Class<int const[5]>::Class<int const[5]>(void)
??0?$Class@$$BY04QAH@@QAE@XZ
; CHECK: __thiscall Class<int *const[5]>::Class<int *const[5]>(void)
??0?$Class@$$BY04QEAH@@QEAA@XZ
; CHECK: __cdecl Class<int *const[5]>::Class<int *const[5]>(void)
??0?$BoolTemplate@$0A@@@QAE@XZ
; CHECK: __thiscall BoolTemplate<0>::BoolTemplate<0>(void)
??0?$BoolTemplate@$0A@@@QEAA@XZ
; CHECK: __cdecl BoolTemplate<0>::BoolTemplate<0>(void)
??0?$BoolTemplate@$00@@QAE@XZ
; CHECK: __thiscall BoolTemplate<1>::BoolTemplate<1>(void)
??0?$BoolTemplate@$00@@QEAA@XZ
; CHECK: __cdecl BoolTemplate<1>::BoolTemplate<1>(void)
??$Foo@H@?$BoolTemplate@$00@@QAEXH@Z
; CHECK: void __thiscall BoolTemplate<1>::Foo<int>(int)
??$Foo@H@?$BoolTemplate@$00@@QEAAXH@Z
; CHECK: void __cdecl BoolTemplate<1>::Foo<int>(int)
??0?$IntTemplate@$0A@@@QAE@XZ
; CHECK: __thiscall IntTemplate<0>::IntTemplate<0>(void)
??0?$IntTemplate@$0A@@@QEAA@XZ
; CHECK: __cdecl IntTemplate<0>::IntTemplate<0>(void)
??0?$IntTemplate@$04@@QAE@XZ
; CHECK: __thiscall IntTemplate<5>::IntTemplate<5>(void)
??0?$IntTemplate@$04@@QEAA@XZ
; CHECK: __cdecl IntTemplate<5>::IntTemplate<5>(void)
??0?$IntTemplate@$0L@@@QAE@XZ
; CHECK: __thiscall IntTemplate<11>::IntTemplate<11>(void)
??0?$IntTemplate@$0L@@@QEAA@XZ
; CHECK: __cdecl IntTemplate<11>::IntTemplate<11>(void)
??0?$IntTemplate@$0BAA@@@QAE@XZ
; CHECK: __thiscall IntTemplate<256>::IntTemplate<256>(void)
??0?$IntTemplate@$0BAA@@@QEAA@XZ
; CHECK: __cdecl IntTemplate<256>::IntTemplate<256>(void)
??0?$IntTemplate@$0CAB@@@QAE@XZ
; CHECK: __thiscall IntTemplate<513>::IntTemplate<513>(void)
??0?$IntTemplate@$0CAB@@@QEAA@XZ
; CHECK: __cdecl IntTemplate<513>::IntTemplate<513>(void)
??0?$IntTemplate@$0EAC@@@QAE@XZ
; CHECK: __thiscall IntTemplate<1026>::IntTemplate<1026>(void)
??0?$IntTemplate@$0EAC@@@QEAA@XZ
; CHECK: __cdecl IntTemplate<1026>::IntTemplate<1026>(void)
??0?$IntTemplate@$0PPPP@@@QAE@XZ
; CHECK: __thiscall IntTemplate<65535>::IntTemplate<65535>(void)
??0?$IntTemplate@$0PPPP@@@QEAA@XZ
; CHECK: __cdecl IntTemplate<65535>::IntTemplate<65535>(void)
??0?$IntTemplate@$0?0@@QAE@XZ
; CHECK: __thiscall IntTemplate<-1>::IntTemplate<-1>(void)
??0?$IntTemplate@$0?0@@QEAA@XZ
; CHECK: __cdecl IntTemplate<-1>::IntTemplate<-1>(void)
??0?$IntTemplate@$0?8@@QAE@XZ
; CHECK: __thiscall IntTemplate<-9>::IntTemplate<-9>(void)
??0?$IntTemplate@$0?8@@QEAA@XZ
; CHECK: __cdecl IntTemplate<-9>::IntTemplate<-9>(void)
??0?$IntTemplate@$0?9@@QAE@XZ
; CHECK: __thiscall IntTemplate<-10>::IntTemplate<-10>(void)
??0?$IntTemplate@$0?9@@QEAA@XZ
; CHECK: __cdecl IntTemplate<-10>::IntTemplate<-10>(void)
??0?$IntTemplate@$0?L@@@QAE@XZ
; CHECK: __thiscall IntTemplate<-11>::IntTemplate<-11>(void)
??0?$IntTemplate@$0?L@@@QEAA@XZ
; CHECK: __cdecl IntTemplate<-11>::IntTemplate<-11>(void)
??0?$UnsignedIntTemplate@$0PPPPPPPP@@@QAE@XZ
; CHECK: __thiscall UnsignedIntTemplate<4294967295>::UnsignedIntTemplate<4294967295>(void)
??0?$UnsignedIntTemplate@$0PPPPPPPP@@@QEAA@XZ
; CHECK: __cdecl UnsignedIntTemplate<4294967295>::UnsignedIntTemplate<4294967295>(void)
??0?$LongLongTemplate@$0?IAAAAAAAAAAAAAAA@@@QAE@XZ
; CHECK: __thiscall LongLongTemplate<-9223372036854775808>::LongLongTemplate<-9223372036854775808>(void)
??0?$LongLongTemplate@$0?IAAAAAAAAAAAAAAA@@@QEAA@XZ
; CHECK: __cdecl LongLongTemplate<-9223372036854775808>::LongLongTemplate<-9223372036854775808>(void)
??0?$LongLongTemplate@$0HPPPPPPPPPPPPPPP@@@QAE@XZ
; CHECK: __thiscall LongLongTemplate<9223372036854775807>::LongLongTemplate<9223372036854775807>(void)
??0?$LongLongTemplate@$0HPPPPPPPPPPPPPPP@@@QEAA@XZ
; CHECK: __cdecl LongLongTemplate<9223372036854775807>::LongLongTemplate<9223372036854775807>(void)
; -1 is indistinguishable from uint64_max in this encoding.
??0?$UnsignedLongLongTemplate@$0?0@@QAE@XZ
; CHECK: __thiscall UnsignedLongLongTemplate<-1>::UnsignedLongLongTemplate<-1>(void)
??0?$UnsignedLongLongTemplate@$0?0@@QEAA@XZ
; CHECK: __cdecl UnsignedLongLongTemplate<-1>::UnsignedLongLongTemplate<-1>(void)
??$foo@H@space@@YAABHABH@Z
; CHECK: int const & __cdecl space::foo<int>(int const &)
??$foo@H@space@@YAAEBHAEBH@Z
; CHECK: int const & __cdecl space::foo<int>(int const &)
??$FunctionPointerTemplate@$1?spam@@YAXXZ@@YAXXZ
; CHECK: void __cdecl FunctionPointerTemplate<&void __cdecl spam(void)>(void)
??$variadic_fn_template@HHHH@@YAXABH000@Z
; CHECK: void __cdecl variadic_fn_template<int, int, int, int>(int const &, int const &, int const &, int const &)
??$variadic_fn_template@HHD$$BY01D@@YAXABH0ABDAAY01$$CBD@Z
; CHECK: void __cdecl variadic_fn_template<int, int, char, char[2]>(int const &, int const &, char const &, char const (&)[2]
??0?$VariadicClass@HD_N@@QAE@XZ
; CHECK: __thiscall VariadicClass<int, char, bool>::VariadicClass<int, char, bool>(void)
??0?$VariadicClass@_NDH@@QAE@XZ
; CHECK: __thiscall VariadicClass<bool, char, int>::VariadicClass<bool, char, int>(void)
?template_template_fun@@YAXU?$Type@U?$Thing@USecond@@$00@@USecond@@@@@Z
; CHECK: void __cdecl template_template_fun(struct Type<struct Thing<struct Second, 1>, struct Second>)
??$template_template_specialization@$$A6AXU?$Type@U?$Thing@USecond@@$00@@USecond@@@@@Z@@YAXXZ
; CHECK: void __cdecl template_template_specialization<void __cdecl(struct Type<struct Thing<struct Second, 1>, struct Second>)>(void)
?f@@YAXU?$S1@$0A@@@@Z
; CHECK: void __cdecl f(struct S1<0>)
?recref@@YAXU?$type1@$E?inst@@3Urecord@@B@@@Z
; CHECK: void __cdecl recref(struct type1<struct record const inst>)
?fun@@YAXU?$UUIDType1@Uuuid@@$1?_GUID_12345678_1234_1234_1234_1234567890ab@@3U__s_GUID@@B@@@Z
; CHECK: void __cdecl fun(struct UUIDType1<struct uuid, &struct __s_GUID const _GUID_12345678_1234_1234_1234_1234567890ab>)
?fun@@YAXU?$UUIDType2@Uuuid@@$E?_GUID_12345678_1234_1234_1234_1234567890ab@@3U__s_GUID@@B@@@Z
; CHECK: void __cdecl fun(struct UUIDType2<struct uuid, struct __s_GUID const _GUID_12345678_1234_1234_1234_1234567890ab>)
?FunctionDefinedWithInjectedName@@YAXU?$TypeWithFriendDefinition@H@@@Z
; CHECK: void __cdecl FunctionDefinedWithInjectedName(struct TypeWithFriendDefinition<int>)
?bar@?$UUIDType4@$1?_GUID_12345678_1234_1234_1234_1234567890ab@@3U__s_GUID@@B@@QAEXXZ
; CHECK: void __thiscall UUIDType4<&struct __s_GUID const _GUID_12345678_1234_1234_1234_1234567890ab>::bar(void)
??$f@US@@$1?g@1@QEAAXXZ@@YAXXZ
; CHECK: void __cdecl f<struct S, &public: void __cdecl S::g(void)>(void)
??$?0N@?$Foo@H@@QEAA@N@Z
; CHECK: __cdecl Foo<int>::Foo<int><double>(double)
|