majnemer added inline comments.
================
Comment at: lib/AST/MicrosoftMangle.cpp:1844-1857
@@ -1843,4 +1843,16 @@
// Happens for function pointer type arguments for example.
- for (const QualType &Arg : Proto->param_types())
- mangleArgumentType(Arg, Range);
+ for (unsigned I = 0, E = Proto->getNumParams(); I != E; ++I) {
+ mangleArgumentType(Proto->getParamType(I), Range);
+ // Mangle each pass_object_size parameter as if it's a paramater of enum
+ // type passed directly after the parameter with the pass_object_size
+ // attribute. The aforementioned enum's name is __pass_object_size, and
we
+ // pretend it resides in a top-level namespace called __ext.
+ //
+ // FIXME: Is there a defined extension notation for the MS ABI, or is it
+ // necessary to just cross our fingers and hope this type+namespace
+ // combination doesn't conflict with anything?
+ if (D)
+ if (auto *P = D->getParamDecl(I)->getAttr<PassObjectSizeAttr>())
+ Out << "W4__pass_object_size" << P->getType() << "@__ext@@";
+ }
// <builtin-type> ::= Z # ellipsis
----------------
This seems fine to me, I'd change the namespace to something like `__clang`
though.
http://reviews.llvm.org/D13263
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits