blob: a7111005d5b9f481b1ca32a22b2db89b26c27681 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Wang Nan00b86692016-11-26 07:03:34 +00002#include "tests.h"
Wang Nan00b86692016-11-26 07:03:34 +00003#include "c++/clang-c.h"
Arnaldo Carvalho de Melo877a7a12017-04-17 11:39:06 -03004#include <linux/kernel.h>
Wang Nan00b86692016-11-26 07:03:34 +00005
Wang Nan00b86692016-11-26 07:03:34 +00006#ifndef HAVE_LIBCLANGLLVM_SUPPORT
Ian Rogers44a85282021-11-03 23:41:58 -07007static int test__clang_to_IR(struct test_suite *test __maybe_unused,
8 int subtest __maybe_unused)
Wang Nan00b86692016-11-26 07:03:34 +00009{
10 return TEST_SKIP;
11}
Ian Rogers44a85282021-11-03 23:41:58 -070012
13static int test__clang_to_obj(struct test_suite *test __maybe_unused,
14 int subtest __maybe_unused)
Wang Nan00b86692016-11-26 07:03:34 +000015{
Ian Rogers44a85282021-11-03 23:41:58 -070016 return TEST_SKIP;
Wang Nan00b86692016-11-26 07:03:34 +000017}
18#endif
Ian Rogersd68f0362021-11-03 23:41:50 -070019
Ian Rogers44a85282021-11-03 23:41:58 -070020static struct test_case clang_tests[] = {
21 TEST_CASE_REASON("builtin clang compile C source to IR", clang_to_IR,
22 "not compiled in"),
23 TEST_CASE_REASON("builtin clang compile C source to ELF object",
24 clang_to_obj,
25 "not compiled in"),
26 { .name = NULL, }
27};
28
Ian Rogers33f44bf2021-11-03 23:41:51 -070029struct test_suite suite__clang = {
Ian Rogersd68f0362021-11-03 23:41:50 -070030 .desc = "builtin clang support",
Ian Rogers44a85282021-11-03 23:41:58 -070031 .test_cases = clang_tests,
Ian Rogersd68f0362021-11-03 23:41:50 -070032};