[PATCH] D12685: Document the stability policy for LLVM-C APIs.

Amaury SECHET via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 11:33:47 PDT 2015


deadalnix added a comment.

The thing is C is the esperanto of programing languages. Many are using the C API from other languages than C. When changing the signature, you don't get any error, but some weird result. For instance, the change in the landingpad function between 3.6 and 3.7 result in a segfault at runtime rather than any clear error. The extra guarantee that this policy provides is that a given function signature won't change. the only constraint it adds is that, if one want to change the signature, one need to rename the function.

Note that this is pretty much what happens in C++ already as the mangling of the function contains its signature. The policy here ensure that the same guarantee exists for the C API. It needs to be in the policy because the C language does not mangle the signature in the function as C++ does.


http://reviews.llvm.org/D12685





More information about the llvm-commits mailing list