diff options
author | Eric Christopher <echristo@gmail.com> | 2014-11-26 02:54:24 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-11-26 02:54:24 +0000 |
commit | 6fc4b1440d992060a4b849b5504c21256c348a9b (patch) | |
tree | 69f6e7c8deaf9c55d43c64f58b77d6aa2d02b8b4 /llvm/bindings/go/llvm/executionengine.go | |
parent | cb963576be44baebdff0233a1c7658c95f6554c1 (diff) | |
download | bcm5719-llvm-6fc4b1440d992060a4b849b5504c21256c348a9b.tar.gz bcm5719-llvm-6fc4b1440d992060a4b849b5504c21256c348a9b.zip |
Make SetMCJITOptimizationLevel more of a method and pass options
as a reference. Move closer to the type.
llvm-svn: 222805
Diffstat (limited to 'llvm/bindings/go/llvm/executionengine.go')
-rw-r--r-- | llvm/bindings/go/llvm/executionengine.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/bindings/go/llvm/executionengine.go b/llvm/bindings/go/llvm/executionengine.go index db2c2153401..141883975f8 100644 --- a/llvm/bindings/go/llvm/executionengine.go +++ b/llvm/bindings/go/llvm/executionengine.go @@ -35,6 +35,10 @@ type MCJITCompilerOptions struct { C C.struct_LLVMMCJITCompilerOptions } +func (options *MCJITCompilerOptions) SetMCJITOptimizationLevel(level uint) { + options.C.OptLevel = C.uint(level) +} + // helpers func llvmGenericValueRefPtr(t *GenericValue) *C.LLVMGenericValueRef { return (*C.LLVMGenericValueRef)(unsafe.Pointer(t)) @@ -100,10 +104,6 @@ func NewMCJITCompilerOptions() MCJITCompilerOptions { return MCJITCompilerOptions{options} } -func SetMCJITOptimizationLevel(options MCJITCompilerOptions, level uint) { - options.C.OptLevel = C.uint(level) -} - func NewMCJITCompiler(m Module, options MCJITCompilerOptions) (ee ExecutionEngine, err error) { var cmsg *C.char fail := C.LLVMCreateMCJITCompilerForModule(&ee.C, m.C, &options.C, C.size_t(unsafe.Sizeof(C.struct_LLVMMCJITCompilerOptions{})), &cmsg) |