[cfe-commits] [PATCH] Encoding calling conventions in FunctionTypes
Douglas Gregor
dgregor at apple.com
Wed Jan 6 11:41:46 PST 2010
On Jan 6, 2010, at 11:32 AM, Anton Korobeynikov wrote:
> Hello, Everyone
>
>> I'm not convinced that this is the correct formulation of the
>> canonical type, because we may have to cope with the fact that the
>> default calling convention is the same as the cdecl calling
>> convention
>> (always? for some targets? I don't know when).
> Well, at least on win there should be weird mode when default calling
> conv is stdcall (mostly for compatibility with vcpp-generated code,
> etc).
> mainline gcc supports this, llvm-gcc - doesn't (but there is PR for
> this).
Ugh. Thankfully, this can be abstracted away relatively easily. We'd
need to add a DefaultCallingConvention field into LangOptions
(defaults to CC_C, can be changed by some weird option), then have the
getCanonicalCallingConv function I described check LangOptions when
determining the calling convention.
This shouldn't hold up Chip's patch; we can address this option
separately.
- Doug
More information about the cfe-commits
mailing list