[LLVMdev] Problem with code generated for call using stdcall convention
nicholas at mxc.ca
Thu Dec 10 09:51:42 PST 2009
Reid Kleckner wrote:
> On Thu, Dec 10, 2009 at 12:21 PM, Nick Lewycky<nicholas at mxc.ca> wrote:
>> Hans Wennborg wrote:
>>> I too have stumbled over this.
>>> Wouldn't it be a good idea to add a check for this to the function
>>> verifier pass?
>> No. This is a FAQ: http://llvm.org/docs/FAQ.html#callconvwrong
> IMO you could move the cc to the type and still replace mismatched
> calls with unreachable. Are there other design considerations for not
> doing this?
I believe that's correct. The consideration there is ease of changing
the cc. Also, if the cc of the callee mismatches that of the call, we'd
have to insert a bitcast.
More information about the llvm-dev