[PATCH] Fix makeLibCall so that we can have LibCalls with a void return value.

Michael Gottesman mgottesman at apple.com
Fri Aug 9 13:16:57 PDT 2013


LowerCallTo returns a tuple consisting of the return SDValue of a call and the chain for the call. makeLibCall calls LowerCallTo but only returns the return SDValue. This means that any lib call without a return value can not be added into SelectionDAG since you are unable to get access to the chain of the call.

The attached patch fixes that issue by causing makeLibCall to return the tuple from LowerCallTo instead of just the first element. I additionally updated all calls to makeLibCall that use the current form to use the new from and updated two boolean options (doesNotReturn/isReturnValueUsed) that were hard coded as constant arguments to LowerCallTo in makeLibCall into two arguments to makeLibCall with default values set to the original hard coded constants.

Please review,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Update-makeLibCall-to-return-both-the-call-and-the-c.patch
Type: application/octet-stream
Size: 29081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130809/0cff613b/attachment.obj>


More information about the llvm-commits mailing list