astffi.llvm.0.1.2.source-code.jni_com_alibaba_fastffi_llvm_MemoryBuffer_cxx_0x7cbfc3f8.cc Maven / Gradle / Ivy
The newest version!
#include
#include
#include "llvm/Support/MemoryBuffer.h"
#ifdef __cplusplus
extern "C" {
#endif
// Common Stubs
JNIEXPORT
jint JNICALL Java_com_alibaba_fastffi_llvm_MemoryBuffer_1cxx_10x7cbfc3f8__1elementSize_00024_00024_00024(JNIEnv*, jclass) {
return (jint)sizeof(llvm::MemoryBuffer);
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_llvm_MemoryBuffer_1cxx_10x7cbfc3f8_nativeGetMemBufferRef(JNIEnv*, jclass, jlong ptr, jlong rv_base) {
return reinterpret_cast(new((void*)rv_base) llvm::MemoryBufferRef(reinterpret_cast(ptr)->getMemBufferRef()));
}
#ifdef __cplusplus
}
#endif