llvm.org GIT mirror llvm / 9226c07
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242289 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Wilkins 5 years ago
1 changed file(s) with 5 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
10531053 defer C.free(unsafe.Pointer(cvalue))
10541054 C.LLVMAddTargetDependentFunctionAttr(v.C, cattr, cvalue)
10551055 }
1056 func (v Value) SetPersonality(p Value) {
1057 C.LLVMSetPersonalityFn(v.C, p.C)
1058 }
10561059
10571060 // Operations on parameters
10581061 func (v Value) ParamsCount() int { return int(C.LLVMCountParams(v.C)) }
12051208 func (b Builder) SetCurrentDebugLocation(line, col uint, scope, inlinedAt Metadata) {
12061209 C.LLVMSetCurrentDebugLocation2(b.C, C.unsigned(line), C.unsigned(col), scope.C, inlinedAt.C)
12071210 }
1208 func (b Builder) SetInstDebugLocation(v Value) { C.LLVMSetInstDebugLocation(b.C, v.C) }
1211 func (b Builder) SetInstDebugLocation(v Value) { C.LLVMSetInstDebugLocation(b.C, v.C) }
12091212 func (b Builder) InsertDeclare(module Module, storage Value, md Value) Value {
12101213 f := module.NamedFunction("llvm.dbg.declare")
12111214 if f.IsNil() {
17241727 return
17251728 }
17261729
1727 func (b Builder) CreateLandingPad(t Type, personality Value, nclauses int, name string) (l Value) {
1730 func (b Builder) CreateLandingPad(t Type, nclauses int, name string) (l Value) {
17281731 cname := C.CString(name)
17291732 defer C.free(unsafe.Pointer(cname))
17301733 l.C = C.LLVMBuildLandingPad(b.C, t.C, C.unsigned(nclauses), cname)