github.com/aykevl/tinygo@v0.5.0/loader/libclang_stubs.c (about)

     1  
     2  // This file implements some small trampoline functions. The signatures
     3  // are slightly different from the ones defined in libclang.go, but they
     4  // should be ABI compatible.
     5  
     6  #include <clang-c/Index.h> // if this fails, install libclang-8-dev
     7  
     8  CXCursor tinygo_clang_getTranslationUnitCursor(CXTranslationUnit tu) {
     9  	return clang_getTranslationUnitCursor(tu);
    10  }
    11  
    12  unsigned tinygo_clang_visitChildren(CXCursor parent, CXCursorVisitor visitor, CXClientData client_data) {
    13  	return clang_visitChildren(parent, visitor, client_data);
    14  }
    15  
    16  CXString tinygo_clang_getCursorSpelling(CXCursor c) {
    17  	return clang_getCursorSpelling(c);
    18  }
    19  
    20  enum CXCursorKind tinygo_clang_getCursorKind(CXCursor c) {
    21  	return clang_getCursorKind(c);
    22  }
    23  
    24  CXType tinygo_clang_getCursorType(CXCursor c) {
    25  	return clang_getCursorType(c);
    26  }
    27  
    28  CXCursor tinygo_clang_getTypeDeclaration(CXType t) {
    29  	return clang_getTypeDeclaration(t);
    30  }
    31  
    32  CXType tinygo_clang_getTypedefDeclUnderlyingType(CXCursor c) {
    33  	return clang_getTypedefDeclUnderlyingType(c);
    34  }
    35  
    36  CXType tinygo_clang_getCursorResultType(CXCursor c) {
    37  	return clang_getCursorResultType(c);
    38  }
    39  
    40  int tinygo_clang_Cursor_getNumArguments(CXCursor c) {
    41  	return clang_Cursor_getNumArguments(c);
    42  }
    43  
    44  CXCursor tinygo_clang_Cursor_getArgument(CXCursor c, unsigned i) {
    45  	return clang_Cursor_getArgument(c, i);
    46  }