On Jul 10, 2013, at 5:52 AM, Reid Kleckner <[email protected]> wrote:
> So, after digging into this, I discovered that even though we have enums for 
> the calling conventions in AttributedType, they are dead.  They are only used 
> in case labels.  John added AttributedType with the enum in 2011 here:
> http://llvm.org/viewvc/llvm-project?view=revision&revision=122942
> 
> I think his intention was that we should be using AttributedType for calling 
> conventions.  Today what we do is unwrap and rewrap the FunctionType with a 
> new calling convention.  CC_Default is used everywhere there wasn't an 
> explicit attribute.  There are exceptions like -mrtd which force the CC to 
> stdcall, but it looks pretty buggy with lots of checks to try to infer if the 
> stdcall convention was applied by -mrtd or explicitly with an attribute.
> 
> It looks like in the long run handleFunctionTypeAttr should be doing what it 
> does today, except it should wrap FunctionType in some AttributedType sugar 
> which points to the original function type and the new function type.
> 
> Does that make sense?

Yes, that's the intended direction.

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to