[llvm] r240010 - Update LLVM bindings after r239940. Apparently these aren't included in

David Majnemer david.majnemer at gmail.com
Thu Jun 18 18:35:08 PDT 2015


On Thu, Jun 18, 2015 at 6:19 PM, Sean Silva <chisophugis at gmail.com> wrote:

>
>
> On Thu, Jun 18, 2015 at 5:26 PM, Eric Christopher <echristo at gmail.com>
> wrote:
>
>> Hi Sean,
>>
>> Daniel is a few time zones ahead and likely won't get this, probably best
>> if you do.
>>
>> That said, we should also talk to David (on the to: line) who put in the
>> personality function change in the first place :)
>>
>
> Yeah. David, is there something reasonable we can do here to avoid
> breaking compatibility? It looks like this just moved from the instruction
> to the function. Could we set it on the function instead? (From your commit
> message on r239940, it seems like any existing correct code already had all
> of the personality functions within a given function the same, so can we
> just set the landingpad on the function?)
>

We could do that but it would be inconsistent with what we have done with
linkage.  For example: LLVMSetLinkage with LLVMDLLImportLinkage doesn't
call setDLLStorageClass for you.

I wasn't under the impression that LLVMBuildLandingPad was part of a stable
interface.  Do we have any documentation or comments to that effect?  I
couldn't find anything official looking which stated whether or not the C
bindings are supposed to be link, source or otherwise backwards compatible.


>
> -- Sean Silva
>
>
>>
>> -eric
>>
>> On Thu, Jun 18, 2015 at 5:17 PM Sean Silva <chisophugis at gmail.com> wrote:
>>
>>> On Thu, Jun 18, 2015 at 4:51 AM, Daniel Jasper <djasper at google.com>
>>> wrote:
>>>
>>>> Author: djasper
>>>> Date: Thu Jun 18 06:51:16 2015
>>>> New Revision: 240010
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=240010&view=rev
>>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D240010-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=YsSTrhlh9O_kmWjeb1BzcD_TLPzCIn6eE2a-of73nkw&s=ISg5f3joyz7eUgRD46Tng4zVsdq8Ptucwi23hYKJhdU&e=>
>>>> Log:
>>>> Update LLVM bindings after r239940. Apparently these aren't included in
>>>> any tests and I even don't know how to run the tests. This seems like a
>>>> minimal change to make them work again, although I can't really verify
>>>> at this point. Additionally, it probably makes sense to propagate the
>>>> personality parameter removal further.
>>>>
>>>> Modified:
>>>>     llvm/trunk/bindings/go/llvm/ir.go
>>>>     llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
>>>>     llvm/trunk/include/llvm-c/Core.h
>>>>
>>>> Modified: llvm/trunk/bindings/go/llvm/ir.go
>>>> URL:
>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/ir.go?rev=240010&r1=240009&r2=240010&view=diff
>>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_bindings_go_llvm_ir.go-3Frev-3D240010-26r1-3D240009-26r2-3D240010-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=YsSTrhlh9O_kmWjeb1BzcD_TLPzCIn6eE2a-of73nkw&s=QHKyRUxR1gyWpkI0L0T_5erI_1kpaAjYBV2pvJDwj2Q&e=>
>>>>
>>>> ==============================================================================
>>>> --- llvm/trunk/bindings/go/llvm/ir.go (original)
>>>> +++ llvm/trunk/bindings/go/llvm/ir.go Thu Jun 18 06:51:16 2015
>>>> @@ -1728,7 +1728,7 @@ func (b Builder) CreatePtrDiff(lhs, rhs
>>>>  func (b Builder) CreateLandingPad(t Type, personality Value, nclauses
>>>> int, name string) (l Value) {
>>>>         cname := C.CString(name)
>>>>         defer C.free(unsafe.Pointer(cname))
>>>> -       l.C = C.LLVMBuildLandingPad(b.C, t.C, personality.C,
>>>> C.unsigned(nclauses), cname)
>>>> +       l.C = C.LLVMBuildLandingPad(b.C, t.C, C.unsigned(nclauses),
>>>> cname)
>>>>         return l
>>>>  }
>>>>
>>>>
>>>> Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
>>>> URL:
>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c?rev=240010&r1=240009&r2=240010&view=diff
>>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_bindings_ocaml_llvm_llvm-5Focaml.c-3Frev-3D240010-26r1-3D240009-26r2-3D240010-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=YsSTrhlh9O_kmWjeb1BzcD_TLPzCIn6eE2a-of73nkw&s=u8Q4SrjRulqxip1O4gvhkZor_Lfld0KzI7Bw4-CFIsw&e=>
>>>>
>>>> ==============================================================================
>>>> --- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c (original)
>>>> +++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c Thu Jun 18 06:51:16 2015
>>>> @@ -1745,7 +1745,7 @@ CAMLprim LLVMValueRef llvm_build_invoke_
>>>>  CAMLprim LLVMValueRef llvm_build_landingpad(LLVMTypeRef Ty,
>>>> LLVMValueRef PersFn,
>>>>                                              value NumClauses,  value
>>>> Name,
>>>>                                              value B) {
>>>> -    return LLVMBuildLandingPad(Builder_val(B), Ty, PersFn,
>>>> Int_val(NumClauses),
>>>> +    return LLVMBuildLandingPad(Builder_val(B), Ty, Int_val(NumClauses),
>>>>                                 String_val(Name));
>>>>  }
>>>>
>>>>
>>>> Modified: llvm/trunk/include/llvm-c/Core.h
>>>> URL:
>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=240010&r1=240009&r2=240010&view=diff
>>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_include_llvm-2Dc_Core.h-3Frev-3D240010-26r1-3D240009-26r2-3D240010-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=YsSTrhlh9O_kmWjeb1BzcD_TLPzCIn6eE2a-of73nkw&s=vLo2dlPV9CSkfixgYmWNecucybIXWG4UgsjsGL0WGVw&e=>
>>>>
>>>> ==============================================================================
>>>> --- llvm/trunk/include/llvm-c/Core.h (original)
>>>> +++ llvm/trunk/include/llvm-c/Core.h Thu Jun 18 06:51:16 2015
>>>> @@ -2661,8 +2661,7 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilder
>>>>                               LLVMBasicBlockRef Then, LLVMBasicBlockRef
>>>> Catch,
>>>>                               const char *Name);
>>>>  LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
>>>> -                                 LLVMValueRef PersFn, unsigned
>>>> NumClauses,
>>>> -                                 const char *Name);
>>>> +                                 unsigned NumClauses, const char
>>>> *Name);
>>>>
>>>
>>> This is ABI incompatible. Please revert.
>>>
>>> -- Sean Silva
>>>
>>>
>>>>  LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn);
>>>>  LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef);
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>>
>>> _______________________________________________
>>> 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/20150618/8ad1193d/attachment.html>


More information about the llvm-commits mailing list