astffi.llvm.0.1.2.source-code.jni_com_alibaba_fastffi_llvm_Optional_cxx_0x5e17d10c.cc Maven / Gradle / Ivy
The newest version!
#include
#include
#include "llvm/ADT/Optional.h"
#ifdef __cplusplus
extern "C" {
#endif
// Common Stubs
JNIEXPORT
jint JNICALL Java_com_alibaba_fastffi_llvm_Optional_1cxx_10x5e17d10c__1elementSize_00024_00024_00024(JNIEnv*, jclass) {
return (jint)sizeof(llvm::Optional);
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_llvm_Optional_1cxx_10x5e17d10c_nativeGetValue(JNIEnv*, jclass, jlong ptr) {
return (jlong)(reinterpret_cast*>(ptr)->getValue());
}
JNIEXPORT
jboolean JNICALL Java_com_alibaba_fastffi_llvm_Optional_1cxx_10x5e17d10c_nativeHasValue(JNIEnv*, jclass, jlong ptr) {
return (reinterpret_cast*>(ptr)->hasValue()) ? JNI_TRUE : JNI_FALSE;
}
#ifdef __cplusplus
}
#endif