// Apache License v2.0 with LLVM Exceptions
// WARNING: This file has automatically been generated
// Code generated by https://git.io/c-for-go. DO NOT EDIT.
package llvm
/*
#include <stdlib.h>
#include "cgo_helpers.h"
*/
import "C"
// LLVMContextRef as declared in sigo/test.h:1
type LLVMContextRef C.struct_LLVMOpaqueContext
llvm.go
// Apache License v2.0 with LLVM Exceptions
// WARNING: This file has automatically been generated
// Code generated by https://git.io/c-for-go. DO NOT EDIT.
package llvm
/*
#include <stdlib.h>
#include "cgo_helpers.h"
*/
import "C"
import (
"runtime"
"unsafe"
)
// LLVMContextGetDiagnosticContext function as declared in sigo/test.h:3
func LLVMContextGetDiagnosticContext(c LLVMOpaqueContext) unsafe.Pointer {
cc, ccAllocMap := *(*C.struct_LLVMOpaqueContext)(unsafe.Pointer(&c)), cgoAllocsUnknown
__ret := C.LLVMContextGetDiagnosticContext(cc)
runtime.KeepAlive(ccAllocMap)
__v := *(*unsafe.Pointer)(unsafe.Pointer(&__ret))
return __v
}
In LLVMContextGetDiagnosticContext I expected the parameter to be of type LLVMContextRef, not LLVMOpaqueContext which is not directly defined.
Consider the following C:
and the following config:
The produces the following: types.go
llvm.go
In
LLVMContextGetDiagnosticContext
I expected the parameter to be of typeLLVMContextRef
, notLLVMOpaqueContext
which is not directly defined.