Reformat with gofmt.
[oota-llvm.git] / bindings / go / llvm / executionengine.go
index db2c2153401811c9fc81e14dfe8d6a0986a3552f..23c185c010b40ad1c21a9aec7e5190bf7cc01c1d 100644 (file)
@@ -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)