aboutsummaryrefslogtreecommitdiffhomepage
path: root/cgo/libclang_stubs.c
blob: 293ca6026cc5771533d5ad8742171a0d35c1eb5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

// This file implements some small trampoline functions. The signatures
// are slightly different from the ones defined in libclang.go, but they
// should be ABI compatible.

#include <clang-c/Index.h> // if this fails, install libclang-10-dev

CXCursor tinygo_clang_getTranslationUnitCursor(CXTranslationUnit tu) {
	return clang_getTranslationUnitCursor(tu);
}

unsigned tinygo_clang_visitChildren(CXCursor parent, CXCursorVisitor visitor, CXClientData client_data) {
	return clang_visitChildren(parent, visitor, client_data);
}

CXString tinygo_clang_getCursorSpelling(CXCursor c) {
	return clang_getCursorSpelling(c);
}

enum CXCursorKind tinygo_clang_getCursorKind(CXCursor c) {
	return clang_getCursorKind(c);
}

CXType tinygo_clang_getCursorType(CXCursor c) {
	return clang_getCursorType(c);
}

CXCursor tinygo_clang_getTypeDeclaration(CXType t) {
	return clang_getTypeDeclaration(t);
}

CXType tinygo_clang_getTypedefDeclUnderlyingType(CXCursor c) {
	return clang_getTypedefDeclUnderlyingType(c);
}

CXType tinygo_clang_getCursorResultType(CXCursor c) {
	return clang_getCursorResultType(c);
}

int tinygo_clang_Cursor_getNumArguments(CXCursor c) {
	return clang_Cursor_getNumArguments(c);
}

CXCursor tinygo_clang_Cursor_getArgument(CXCursor c, unsigned i) {
	return clang_Cursor_getArgument(c, i);
}

CXSourceLocation tinygo_clang_getCursorLocation(CXCursor c) {
	return clang_getCursorLocation(c);
}

CXSourceRange tinygo_clang_getCursorExtent(CXCursor c) {
	return clang_getCursorExtent(c);
}

CXTranslationUnit tinygo_clang_Cursor_getTranslationUnit(CXCursor c) {
	return clang_Cursor_getTranslationUnit(c);
}

long long tinygo_clang_getEnumConstantDeclValue(CXCursor c) {
	return clang_getEnumConstantDeclValue(c);
}

CXType tinygo_clang_getEnumDeclIntegerType(CXCursor c) {
	return clang_getEnumDeclIntegerType(c);
}

unsigned tinygo_clang_Cursor_isBitField(CXCursor c) {
	return clang_Cursor_isBitField(c);
}