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

Eric Christopher echristo at gmail.com
Tue Nov 25 18:55:23 PST 2014


Correctness fix should be here:

M bindings/go/llvm/executionengine.go
M bindings/go/llvm/executionengine_test.go
Committed r222805

I'll see if I can work up some code to wrap the other methods.


On Tue Nov 25 2014 at 6:44:13 PM Eric Christopher <echristo at gmail.com>
wrote:

> 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.
>>
>>
> Cool, I wasn't sure if you wanted setters on the type or free functions.
> I'll move things around and play. Also, thanks for the review :)
>
> -eric
>
>
>> Thanks,
>
>
>> --
>> Peter
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141126/6bb396c7/attachment.html>


More information about the llvm-commits mailing list