astffi.llvm.0.1.2.source-code.jni_com_alibaba_fastffi_llvm_Expected_cxx_0xa442adb3.cc Maven / Gradle / Ivy
The newest version!
#include
#include
#include "llvm/Support/Error.h"
#include "llvm/Object/Binary.h"
#include "llvm/IR/Module.h"
#include "clang/Tooling/CommonOptionsParser.h"
#ifdef __cplusplus
extern "C" {
#endif
// Common Stubs
JNIEXPORT
jint JNICALL Java_com_alibaba_fastffi_llvm_Expected_1cxx_10xa442adb3__1elementSize_00024_00024_00024(JNIEnv*, jclass) {
return (jint)sizeof(llvm::Expected>);
}
JNIEXPORT
jboolean JNICALL Java_com_alibaba_fastffi_llvm_Expected_1cxx_10xa442adb3_nativeBool(JNIEnv*, jclass, jlong ptr) {
return (*reinterpret_cast>*>(ptr)) ? JNI_TRUE : JNI_FALSE;
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_llvm_Expected_1cxx_10xa442adb3_nativeGet(JNIEnv*, jclass, jlong ptr) {
return reinterpret_cast(&(reinterpret_cast>*>(ptr)->get()));
}
#ifdef __cplusplus
}
#endif