[PATCH] D71528: [bindings/go] Add Subprogram method
Ayke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 15 09:37:26 PST 2019
aykevl created this revision.
aykevl added reviewers: whitequark, CodaFi.
Herald added a project: LLVM.
This method allows getting the subprogram metadata object from a function value.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71528
Files:
llvm/bindings/go/llvm/dibuilder.go
Index: llvm/bindings/go/llvm/dibuilder.go
===================================================================
--- llvm/bindings/go/llvm/dibuilder.go
+++ llvm/bindings/go/llvm/dibuilder.go
@@ -586,6 +586,11 @@
C.LLVMSetSubprogram(v.C, sp.C)
}
+func (v Value) Subprogram() (md Metadata) {
+ md.C = C.LLVMGetSubprogram(v.C)
+ return
+}
+
func boolToCInt(v bool) C.int {
if v {
return 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71528.233973.patch
Type: text/x-patch
Size: 394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191215/50c84ea8/attachment.bin>
More information about the llvm-commits
mailing list