[llvm] r242289 - Expose setPersonalityFn to Go

Andrew Wilkins axwalk at gmail.com
Wed Jul 15 06:03:08 PDT 2015


Author: axw
Date: Wed Jul 15 08:03:08 2015
New Revision: 242289

URL: http://llvm.org/viewvc/llvm-project?rev=242289&view=rev
Log:
Expose setPersonalityFn to Go

Summary:
Add Value.SetPersonality to the Go bindings. The Go
bindings' Builder.CreateLandingPad has been updated,
removing the obsolete personality argument.

Background

The personality attribute was removed from LandingPadInst
in r239940, and llvm::Function::setPersonalityFn introduced.

There was no corresponding change to either the C API or
Go bindings. The Go bindings were broken until r239940, but
that change was just to ignore the personality argument.
This broke llgo.

Reviewers: majnemer, pcc

Subscribers: deadalnix, llvm-commits, axw

Differential Revision: http://reviews.llvm.org/D11116

Modified:
    llvm/trunk/bindings/go/llvm/ir.go

Modified: llvm/trunk/bindings/go/llvm/ir.go
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/ir.go?rev=242289&r1=242288&r2=242289&view=diff
==============================================================================
--- llvm/trunk/bindings/go/llvm/ir.go (original)
+++ llvm/trunk/bindings/go/llvm/ir.go Wed Jul 15 08:03:08 2015
@@ -1054,6 +1054,9 @@ func (v Value) AddTargetDependentFunctio
 	defer C.free(unsafe.Pointer(cvalue))
 	C.LLVMAddTargetDependentFunctionAttr(v.C, cattr, cvalue)
 }
+func (v Value) SetPersonality(p Value) {
+	C.LLVMSetPersonalityFn(v.C, p.C)
+}
 
 // Operations on parameters
 func (v Value) ParamsCount() int { return int(C.LLVMCountParams(v.C)) }
@@ -1206,7 +1209,7 @@ func (b Builder) Dispose() { C.LLVMDispo
 func (b Builder) SetCurrentDebugLocation(line, col uint, scope, inlinedAt Metadata) {
 	C.LLVMSetCurrentDebugLocation2(b.C, C.unsigned(line), C.unsigned(col), scope.C, inlinedAt.C)
 }
-func (b Builder) SetInstDebugLocation(v Value)    { C.LLVMSetInstDebugLocation(b.C, v.C) }
+func (b Builder) SetInstDebugLocation(v Value) { C.LLVMSetInstDebugLocation(b.C, v.C) }
 func (b Builder) InsertDeclare(module Module, storage Value, md Value) Value {
 	f := module.NamedFunction("llvm.dbg.declare")
 	if f.IsNil() {
@@ -1725,7 +1728,7 @@ func (b Builder) CreatePtrDiff(lhs, rhs
 	return
 }
 
-func (b Builder) CreateLandingPad(t Type, personality Value, nclauses int, name string) (l Value) {
+func (b Builder) CreateLandingPad(t Type, nclauses int, name string) (l Value) {
 	cname := C.CString(name)
 	defer C.free(unsafe.Pointer(cname))
 	l.C = C.LLVMBuildLandingPad(b.C, t.C, C.unsigned(nclauses), cname)





More information about the llvm-commits mailing list