X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=bindings%2Fgo%2Fllvm%2Fir.go;h=dcc34d8b3b8b962ff7deb1efcf30cacfc88c42b5;hp=1f00cd584730791cfcf69e11b7a98ab3416c70e7;hb=9226c071b0065918ce487872895f7dae35ce2382;hpb=9784231221a895e7c2ef7c79b3a1ef597bc10390 diff --git a/bindings/go/llvm/ir.go b/bindings/go/llvm/ir.go index 1f00cd58473..dcc34d8b3b8 100644 --- a/bindings/go/llvm/ir.go +++ b/bindings/go/llvm/ir.go @@ -1054,6 +1054,9 @@ func (v Value) AddTargetDependentFunctionAttr(attr, value string) { 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.LLVMDisposeBuilder(b.C) } 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,10 +1728,10 @@ func (b Builder) CreatePtrDiff(lhs, rhs Value, name string) (v Value) { 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, personality.C, C.unsigned(nclauses), cname) + l.C = C.LLVMBuildLandingPad(b.C, t.C, C.unsigned(nclauses), cname) return l }