1 #ifndef PERF_UTIL_CLANG_C_H
2 #define PERF_UTIL_CLANG_C_H
4 #include <stddef.h> /* for size_t */
5 #include <util-cxx.h> /* for __maybe_unused */
11 #ifdef HAVE_LIBCLANGLLVM_SUPPORT
12 extern void perf_clang__init(void);
13 extern void perf_clang__cleanup(void);
15 extern int test__clang_to_IR(void);
16 extern int test__clang_to_obj(void);
18 extern int perf_clang__compile_bpf(const char *filename,
20 size_t *p_obj_buf_sz);
25 static inline void perf_clang__init(void) { }
26 static inline void perf_clang__cleanup(void) { }
28 static inline int test__clang_to_IR(void) { return -1; }
29 static inline int test__clang_to_obj(void) { return -1;}
32 perf_clang__compile_bpf(const char *filename __maybe_unused,
33 void **p_obj_buf __maybe_unused,
34 size_t *p_obj_buf_sz __maybe_unused)