[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 16:52:55 PST 2018


rnk added a comment.

In https://reviews.llvm.org/D42768#994458, @rjmccall wrote:

> No, I mean things like `void foo(__attribute__((swiftcall)) void (*fnptr)());`.


Yeah, this was the example I was going to bring up. There's no function parameter declaration to put the NNS on.

So, here's an idea that's probably general. It's what we do for vector types and (I think?) Obj-C blocks. Whenever we need to mangle a FunctionType with swiftcc, we look at the function type and mangle it as a `struct __swiftcc<T>` where T is the FunctionType without the convention.


Repository:
  rC Clang

https://reviews.llvm.org/D42768





More information about the cfe-commits mailing list