astffi.llvm.0.1.2.source-code.jni_com_alibaba_fastffi_llvm_Module_cxx_0xd948bf03.cc Maven / Gradle / Ivy
The newest version!
#include
#include
#include "llvm/IR/Module.h"
#ifdef __cplusplus
extern "C" {
#endif
// Common Stubs
JNIEXPORT
jint JNICALL Java_com_alibaba_fastffi_llvm_Module_1cxx_10xd948bf03__1elementSize_00024_00024_00024(JNIEnv*, jclass) {
return (jint)sizeof(llvm::Module);
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_llvm_Module_1cxx_10xd948bf03_nativeGetDataLayout(JNIEnv*, jclass, jlong ptr) {
return reinterpret_cast(&(reinterpret_cast(ptr)->getDataLayout()));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_llvm_Module_1cxx_10xd948bf03_nativeGetFunctionList(JNIEnv*, jclass, jlong ptr) {
return reinterpret_cast(&(reinterpret_cast(ptr)->getFunctionList()));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_llvm_Module_1cxx_10xd948bf03_nativeGetGlobalList(JNIEnv*, jclass, jlong ptr) {
return reinterpret_cast(&(reinterpret_cast(ptr)->getGlobalList()));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_llvm_Module_1cxx_10xd948bf03_nativeGetName(JNIEnv*, jclass, jlong ptr, jlong rv_base) {
return reinterpret_cast(new((void*)rv_base) llvm::StringRef(reinterpret_cast(ptr)->getName()));
}
#ifdef __cplusplus
}
#endif