This patch adds LLVMGetSubtypes to Go API (as Type.Subtypes), tests included. Please commit this patch if/when everything's OK, as I do not have commit access
Details
Diff Detail
Event Timeline
I don't know go that much so I'll give the opportunity to someone that knows better checks this out.
Well, svn blame said you did some things in go API, so i thought i might as well assign you too
Code looks fine, and thanks for adding a test. I just think this one should be a method rather than a free function.
bindings/go/llvm/ir.go | ||
---|---|---|
614 | I think this should be a method, similar to Type.ParamTypes. I suggest func (t Type) Subtypes() []Type. | |
bindings/go/llvm/ir_test.go | ||
143 | Drop the semicolon, they're unnecessary in Go. |
Sorry, I shouldn't really have said *suggest*. Can you please rename GetSubtypes to Subtypes? GetFoo is not idiomatic in Go (there are some instances of GetFoo in the existing code, but they're stuck like that until someone decides to break compatibility).
I think this should be a method, similar to Type.ParamTypes. I suggest func (t Type) Subtypes() []Type.