[cfe-dev] Bugfixer's question about how C calling convention corresponds to platform CC
David Tweed
david.tweed at arm.com
Mon Oct 8 09:14:28 PDT 2012
Wei-Ren wrote
| if the function's calling convention is NOT C, then the result is NOT what FileCheck
| expect. So do you expect no matter the triple is arm-linux-gnueabihf or arm-linux-gnueabi,
| the result should be "define void @foo"? In other word, function's calling convention
| should be C? If so, then we need to figure out how to set F->getCallingConv() to
| CallingConv::C. Otherwise, those pattern in test cases need some tweaks.
Apologies for the delay replying -- had a couple of days off.
My understanding is that somewhere in the code there should be an equating of the C calling convention with a platform specific convention, and from then on function definitions will automatically be output with the "no marker" form "define @foo". I _think_ what's happening it that this equating isn't occurring, so that when functions are created with the natural platform calling convention LLVM doesn't realise this convention is the same as the C convention, i.e., I don't think it's something that should need doing for each function but is a missing initialisation step.
However, we still need to figure out where this happens. Any insight from anyone appreciated.
Regards,
David Tweed
More information about the cfe-dev
mailing list