[PATCH] Add return value attribute to C interface

deadal nix deadalnix at gmail.com
Wed Jul 2 00:01:36 PDT 2014


I see. Is Bill Wendlign still active ? Maybe he has some comment on this.

So what needs to be done is basically have a C interface to manipulate
attribute sets ? Is there any pitfall I may not be aware of, or is this not
done simply because nobody has the time to do it ?




2014-07-01 11:25 GMT-07:00 Reid Kleckner <rnk at google.com>:

> The larger picture is that LLVM IR supports arbitrary string attributes,
> and a bitmask is no longer an appropriate representation for attributes.
>  Bill Wendling never extended the C API to support this.  Furthermore, we
> have more than 32 known, single-bit, enum attributes, so even if we ignore
> string attributes, a 32-bit bitmask is insufficient.
>
>
> On Mon, Jun 30, 2014 at 8:18 PM, deadal nix <deadalnix at gmail.com> wrote:
>
>> OK,
>>
>> Can you explain me the larger picture here ? I can probably come up with
>> something. Being able to specify attributes on return value is important to
>> me, and I can't use the C++ API.
>>
>>
>> 2014-06-30 11:36 GMT-07:00 Reid Kleckner <rnk at google.com>:
>>
>> I'm not excited to add new APIs that use LLVMAttribute.  See this comment
>>> from the end of the enum in Core.h:
>>>     /* FIXME: These attributes are currently not included in the C API as
>>>        a temporary measure until the API/ABI impact to the C API is
>>> understood
>>>        and the path forward agreed upon.
>>>     LLVMAddressSafety = 1ULL << 32,
>>>     LLVMStackProtectStrongAttribute = 1ULL<<33,
>>>     LLVMCold = 1ULL << 34,
>>>     LLVMOptimizeNone = 1ULL << 35,
>>>     LLVMInAllocaAttribute = 1ULL << 36,
>>>     LLVMNonNullAttribute = 1ULL << 37,
>>>     LLVMJumpTableAttribute = 1ULL << 38,
>>>     */
>>>
>>> We haven't addressed this for over a year.
>>>
>>> If you're interested in fleshing out the C API attribute support, do you
>>> mind proposing something that solves this problem?
>>>
>>>
>>>
>>> On Mon, Jun 30, 2014 at 11:24 AM, deadal nix <deadalnix at gmail.com>
>>> wrote:
>>>
>>>> Pong \o/
>>>>
>>>>
>>>> 2014-06-26 22:00 GMT-07:00 deadal nix <deadalnix at gmail.com>:
>>>>
>>>> ping ?
>>>>>
>>>>>
>>>>> 2014-06-24 16:02 GMT-07:00 deadal nix <deadalnix at gmail.com>:
>>>>>
>>>>> ping !
>>>>>>
>>>>>>
>>>>>> 2014-06-20 18:39 GMT-07:00 deadal nix <deadalnix at gmail.com>:
>>>>>>
>>>>>> ping ping ?
>>>>>>>
>>>>>>>
>>>>>>> 2014-06-17 19:11 GMT-07:00 deadal nix <deadalnix at gmail.com>:
>>>>>>>
>>>>>>> ping ?
>>>>>>>>
>>>>>>>>
>>>>>>>> 2014-06-14 23:47 GMT-07:00 deadal nix <deadalnix at gmail.com>:
>>>>>>>>
>>>>>>>> As per title. Right now, the API do not provide any way to set
>>>>>>>>> attributes for return values of function.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140702/1f8ddf22/attachment.html>


More information about the llvm-commits mailing list