[PATCH] D18749: Add LLVMGetAttrKindIDInContext in the C API in order to facilitate migration away from LLVMAttribute

Jakob Bornecrantz via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 07:56:06 PDT 2016


Wallbraker added a comment.

I want a second opinion on this issue.

So what this commit is doing is adding a new function, that people are supposed to use to get the value instead of using the enums in the header. At a later point the semantics will change for the old functions and they will only accept the values retrieved from the new function. Essentially breaking API, if we count changing the meaning of values the same as adding/removing arguments.

Now in the past when breaking the API (as specified above) we have added new functions keeping the old one around for a release or two and then removing the old ones (see LLVMLinkModules2). The advantage of removing the symbols is that people who use not-capable-of-parsing-C-headers-languages will get linking error instead of harder to track down errors, like getting the wrong attribute on emitted functions.

Thoughts and comments please?


http://reviews.llvm.org/D18749





More information about the llvm-commits mailing list