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
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I don't know go that much so I'll give the opportunity to someone that knows better checks this out.
Comment Actions
Well, svn blame said you did some things in go API, so i thought i might as well assign you too
Comment Actions
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 ↗ | (On Diff #101424) | 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 ↗ | (On Diff #101424) | Drop the semicolon, they're unnecessary in Go. |
Comment Actions
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).