github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/cgo/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, libclang headers aren't available. Please take a look here: https://tinygo.org/docs/guides/build/
     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  CXString tinygo_clang_getCursorPrettyPrinted(CXCursor c, CXPrintingPolicy policy) {
    21  	return clang_getCursorPrettyPrinted(c, policy);
    22  }
    23  
    24  CXPrintingPolicy tinygo_clang_getCursorPrintingPolicy(CXCursor c) {
    25  	return clang_getCursorPrintingPolicy(c);
    26  }
    27  
    28  enum CXCursorKind tinygo_clang_getCursorKind(CXCursor c) {
    29  	return clang_getCursorKind(c);
    30  }
    31  
    32  CXType tinygo_clang_getCursorType(CXCursor c) {
    33  	return clang_getCursorType(c);
    34  }
    35  
    36  CXCursor tinygo_clang_getTypeDeclaration(CXType t) {
    37  	return clang_getTypeDeclaration(t);
    38  }
    39  
    40  CXType tinygo_clang_getTypedefDeclUnderlyingType(CXCursor c) {
    41  	return clang_getTypedefDeclUnderlyingType(c);
    42  }
    43  
    44  CXType tinygo_clang_getCursorResultType(CXCursor c) {
    45  	return clang_getCursorResultType(c);
    46  }
    47  
    48  int tinygo_clang_Cursor_getNumArguments(CXCursor c) {
    49  	return clang_Cursor_getNumArguments(c);
    50  }
    51  
    52  CXCursor tinygo_clang_Cursor_getArgument(CXCursor c, unsigned i) {
    53  	return clang_Cursor_getArgument(c, i);
    54  }
    55  
    56  enum CX_StorageClass tinygo_clang_Cursor_getStorageClass(CXCursor c) {
    57  	return clang_Cursor_getStorageClass(c);
    58  }
    59  
    60  CXSourceLocation tinygo_clang_getCursorLocation(CXCursor c) {
    61  	return clang_getCursorLocation(c);
    62  }
    63  
    64  CXSourceRange tinygo_clang_getCursorExtent(CXCursor c) {
    65  	return clang_getCursorExtent(c);
    66  }
    67  
    68  CXTranslationUnit tinygo_clang_Cursor_getTranslationUnit(CXCursor c) {
    69  	return clang_Cursor_getTranslationUnit(c);
    70  }
    71  
    72  long long tinygo_clang_getEnumConstantDeclValue(CXCursor c) {
    73  	return clang_getEnumConstantDeclValue(c);
    74  }
    75  
    76  CXType tinygo_clang_getEnumDeclIntegerType(CXCursor c) {
    77  	return clang_getEnumDeclIntegerType(c);
    78  }
    79  
    80  unsigned tinygo_clang_Cursor_isAnonymous(CXCursor c) {
    81  	return clang_Cursor_isAnonymous(c);
    82  }
    83  
    84  unsigned tinygo_clang_Cursor_isBitField(CXCursor c) {
    85  	return clang_Cursor_isBitField(c);
    86  }