4 #include "c++/clang-c.h"
5 #include <linux/kernel.h>
10 } clang_testcase_table[] = {
11 #ifdef HAVE_LIBCLANGLLVM_SUPPORT
13 .func = test__clang_to_IR,
14 .desc = "builtin clang compile C source to IR",
17 .func = test__clang_to_obj,
18 .desc = "builtin clang compile C source to ELF object",
23 int test__clang_subtest_get_nr(void)
25 return (int)ARRAY_SIZE(clang_testcase_table);
28 const char *test__clang_subtest_get_desc(int i)
30 if (i < 0 || i >= (int)ARRAY_SIZE(clang_testcase_table))
32 return clang_testcase_table[i].desc;
35 #ifndef HAVE_LIBCLANGLLVM_SUPPORT
36 int test__clang(int i __maybe_unused)
41 int test__clang(int i)
43 if (i < 0 || i >= (int)ARRAY_SIZE(clang_testcase_table))
45 return clang_testcase_table[i].func();