astffi.llvm.0.1.2.source-code.jni_com_alibaba_fastffi_clang_ASTUnit_cxx_0x47914e15.cc Maven / Gradle / Ivy
The newest version!
#include
#include
#include "clang/Frontend/ASTUnit.h"
#ifdef __cplusplus
extern "C" {
#endif
// Common Stubs
JNIEXPORT
jint JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15__1elementSize_00024_00024_00024(JNIEnv*, jclass) {
return (jint)sizeof(clang::ASTUnit);
}
JNIEXPORT
void JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeDelete(JNIEnv*, jclass, jlong ptr) {
delete reinterpret_cast(ptr);
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeGetASTContext(JNIEnv*, jclass, jlong ptr) {
return reinterpret_cast(&(reinterpret_cast(ptr)->getASTContext()));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeGetASTFileName(JNIEnv*, jclass, jlong ptr, jlong rv_base) {
return reinterpret_cast(new((void*)rv_base) llvm::StringRef(reinterpret_cast(ptr)->getASTFileName()));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeGetDiagnostics(JNIEnv*, jclass, jlong ptr) {
return reinterpret_cast(&(reinterpret_cast(ptr)->getDiagnostics()));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeGetMainFileName(JNIEnv*, jclass, jlong ptr, jlong rv_base) {
return reinterpret_cast(new((void*)rv_base) llvm::StringRef(reinterpret_cast(ptr)->getMainFileName()));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeGetOriginalSourceFileName(JNIEnv*, jclass, jlong ptr, jlong rv_base) {
return reinterpret_cast(new((void*)rv_base) llvm::StringRef(reinterpret_cast(ptr)->getOriginalSourceFileName()));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeGetPreprocessor(JNIEnv*, jclass, jlong ptr) {
return reinterpret_cast(&(reinterpret_cast(ptr)->getPreprocessor()));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeGetSema(JNIEnv*, jclass, jlong ptr) {
return reinterpret_cast(&(reinterpret_cast(ptr)->getSema()));
}
JNIEXPORT
jboolean JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeHasSema(JNIEnv*, jclass, jlong ptr) {
return (reinterpret_cast(ptr)->hasSema()) ? JNI_TRUE : JNI_FALSE;
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeTop_1level_1begin(JNIEnv*, jclass, jlong ptr, jlong rv_base) {
return reinterpret_cast(new((void*)rv_base) std::vector::iterator(reinterpret_cast(ptr)->top_level_begin()));
}
JNIEXPORT
jboolean JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeTop_1level_1empty(JNIEnv*, jclass, jlong ptr) {
return (reinterpret_cast(ptr)->top_level_empty()) ? JNI_TRUE : JNI_FALSE;
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeTop_1level_1end(JNIEnv*, jclass, jlong ptr, jlong rv_base) {
return reinterpret_cast(new((void*)rv_base) std::vector::iterator(reinterpret_cast(ptr)->top_level_end()));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_clang_ASTUnit_1cxx_10x47914e15_nativeTop_1level_1size(JNIEnv*, jclass, jlong ptr) {
return (jlong)(reinterpret_cast(ptr)->top_level_size());
}
#ifdef __cplusplus
}
#endif