cregit-Linux how code gets into the kernel

Release 4.14 tools/perf/tests/clang.c

Directory: tools/perf/tests
// SPDX-License-Identifier: GPL-2.0
#include "tests.h"
#include "debug.h"
#include "util.h"
#include "c++/clang-c.h"
#include <linux/kernel.h>

static struct {
	
int (*func)(void);
	
const char *desc;

} clang_testcase_table[] = {
#ifdef HAVE_LIBCLANGLLVM_SUPPORT
	{
		.func = test__clang_to_IR,
		.desc = "builtin clang compile C source to IR",
        },
	{
		.func = test__clang_to_obj,
		.desc = "builtin clang compile C source to ELF object",
        },
#endif
};


int test__clang_subtest_get_nr(void) { return (int)ARRAY_SIZE(clang_testcase_table); }

Contributors

PersonTokensPropCommitsCommitProp
Wang Nan16100.00%1100.00%
Total16100.00%1100.00%


const char *test__clang_subtest_get_desc(int i) { if (i < 0 || i >= (int)ARRAY_SIZE(clang_testcase_table)) return NULL; return clang_testcase_table[i].desc; }

Contributors

PersonTokensPropCommitsCommitProp
Wang Nan37100.00%1100.00%
Total37100.00%1100.00%

#ifndef HAVE_LIBCLANGLLVM_SUPPORT
int test__clang(struct test *test __maybe_unused, int i __maybe_unused) { return TEST_SKIP; }

Contributors

PersonTokensPropCommitsCommitProp
Wang Nan1266.67%150.00%
Arnaldo Carvalho de Melo633.33%150.00%
Total18100.00%2100.00%

#else
int test__clang(struct test *test __maybe_unused, int i) { if (i < 0 || i >= (int)ARRAY_SIZE(clang_testcase_table)) return TEST_FAIL; return clang_testcase_table[i].func(); }

Contributors

PersonTokensPropCommitsCommitProp
Wang Nan3685.71%150.00%
Arnaldo Carvalho de Melo614.29%150.00%
Total42100.00%2100.00%

#endif

Overall Contributors

PersonTokensPropCommitsCommitProp
Wang Nan17391.53%240.00%
Arnaldo Carvalho de Melo157.94%240.00%
Greg Kroah-Hartman10.53%120.00%
Total189100.00%5100.00%
Directory: tools/perf/tests
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.