~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/tests/clang.c

Version: ~ [ linux-6.1-rc7 ] ~ [ linux-6.0.10 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.80 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.156 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.225 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.267 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.300 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.334 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #include "tests.h"
  2 #include "debug.h"
  3 #include "util.h"
  4 #include "c++/clang-c.h"
  5 #include <linux/kernel.h>
  6 
  7 static struct {
  8         int (*func)(void);
  9         const char *desc;
 10 } clang_testcase_table[] = {
 11 #ifdef HAVE_LIBCLANGLLVM_SUPPORT
 12         {
 13                 .func = test__clang_to_IR,
 14                 .desc = "builtin clang compile C source to IR",
 15         },
 16         {
 17                 .func = test__clang_to_obj,
 18                 .desc = "builtin clang compile C source to ELF object",
 19         },
 20 #endif
 21 };
 22 
 23 int test__clang_subtest_get_nr(void)
 24 {
 25         return (int)ARRAY_SIZE(clang_testcase_table);
 26 }
 27 
 28 const char *test__clang_subtest_get_desc(int i)
 29 {
 30         if (i < 0 || i >= (int)ARRAY_SIZE(clang_testcase_table))
 31                 return NULL;
 32         return clang_testcase_table[i].desc;
 33 }
 34 
 35 #ifndef HAVE_LIBCLANGLLVM_SUPPORT
 36 int test__clang(int i __maybe_unused)
 37 {
 38         return TEST_SKIP;
 39 }
 40 #else
 41 int test__clang(int i)
 42 {
 43         if (i < 0 || i >= (int)ARRAY_SIZE(clang_testcase_table))
 44                 return TEST_FAIL;
 45         return clang_testcase_table[i].func();
 46 }
 47 #endif
 48 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp