[llvm] r222804 - Make sure that the go bindings call LLVMInitializeMCJITCompilerOptions

Eric Christopher echristo at gmail.com
Tue Nov 25 19:01:13 PST 2014


On Tue Nov 25 2014 at 6:42:53 PM Peter Collingbourne <peter at pcc.me.uk>
wrote:

> On Wed, Nov 26, 2014 at 02:27:46AM -0000, Eric Christopher wrote:
> > +func SetMCJITOptimizationLevel(options MCJITCompilerOptions, level
> uint) {
> > +     options.C.OptLevel = C.uint(level)
> > +}
>
> This function has no effect, as 'options' is passed by value.
>
> This would be better as a method on the MCJITCompilerOptions type.
> The signature should look like this in order to pass 'options' by
> reference:
>
> func (options *MCJITCompilerOptions) SetOptLevel(level uint) { ... }
>
> We should also have setters for the other properties.
>

Do we have users for the other properties yet? I'm not sure if we want to
wrap things just because. Not objecting overly much, just curious.

-eric


>
> Thanks,
> --
> Peter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141126/f456fdec/attachment.html>


More information about the llvm-commits mailing list