[llvm-commits] fix the MSVC warning in include/llvm-c/Core.h

David Blaikie dblaikie at gmail.com
Mon Jan 23 15:19:40 PST 2012


On Mon, Jan 23, 2012 at 3:16 PM, Chandler Carruth <chandlerc at google.com> wrote:
> On Mon, Jan 23, 2012 at 3:04 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>
>> On Mon, Jan 23, 2012 at 2:53 PM, Paul Robinson <pogo.work at gmail.com>
>> wrote:
>> > On Mon, Jan 23, 2012 at 1:45 PM, Kostya Serebryany <kcc at google.com>
>> > wrote:
>> >> There are 8 functions dealing with LLVMAttribute
>> >> in include/llvm-c/Core.h.
>> >> Do you suggest to add 8 more functions that will deal with uint64_t?
>> >> Like this?
>> >>
>> >> void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA);
>> >> void LLVMAddFunctionAttr64(LLVMValueRef Fn, uint64_t PA);
>> >>
>> >> --kcc
>> >
>> > With a more meaningful type name, e.g. LLVMAttribute64 or some such,
>> > yes;
>>
>> Given the constraints of the stable C API (binary compatibility)
>> there's no way we can make this forwards compatible, is there?
>> (passing a struct we could add elements to in the future - that would
>> break binary compat, yes?)
>
>
> You simply have to make the struct opaque, and only manipulated through API
> calls. However that's pretty high cost.

Yeah - I was starting to see that. Pity - so we just add a new
generation of API calls every time we reach the limit.

- David




More information about the llvm-commits mailing list