File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,11 @@ $(H3 $(LNAME2 mangle, $(D pragma mangle)))
272
272
273
273
$(P Overrides the default mangling for a symbol.)
274
274
275
- $(P There must be one $(ASSIGNEXPRESSION) and it must evaluate at compile time to a string literal.
275
+ $(P For variables and functions there must be one $(ASSIGNEXPRESSION) and it must evaluate at compile time to a string literal.
276
+ For aggregates there may be one or two $(ASSIGNEXPRESSION)s, one of which must evaluate at compile time to a string literal and
277
+ one which must evaluate to a symbol. If that symbol is a $(I TemplateInstance), the aggregate is treated as a template
278
+ that has the signature and arguments of the $(I TemplateInstance). The identifier of the symbol is used when no string is supplied.
279
+ Both arguments may be used used when an aggregate's name is a D keyword.
276
280
)
277
281
278
282
$(P It only applies to function and variable symbols. Other symbols are ignored.)
@@ -291,6 +295,18 @@ $(H3 $(LNAME2 mangle, $(D pragma mangle)))
291
295
---
292
296
pragma(mangle, "body")
293
297
extern(C) void body_func();
298
+ pragma(mangle, "function")
299
+ extern(C++) struct _function {}
300
+ template ScopeClass(C)
301
+ {
302
+ pragma(mangle, C.stringof, C)
303
+ struct ScopeClass { char[__traits(classInstanceSize, C)] buffer; }
304
+ }
305
+ extern(C++)
306
+ {
307
+ class MyClassA(T) {}
308
+ void func(ref ScopeClass!(MyClassA!int)); // mangles as MyClass<int>&
309
+ }
294
310
---
295
311
)
296
312
You can’t perform that action at this time.
0 commit comments