Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Wang Nan | b31de01 | 2015-11-06 13:49:41 +0000 | [diff] [blame] | 2 | #ifndef PERF_TEST_LLVM_H |
| 3 | #define PERF_TEST_LLVM_H |
| 4 | |
Wang Nan | e67d52d | 2016-11-26 07:03:37 +0000 | [diff] [blame] | 5 | #ifdef __cplusplus |
| 6 | extern "C" { |
| 7 | #endif |
| 8 | |
Wang Nan | b31de01 | 2015-11-06 13:49:41 +0000 | [diff] [blame] | 9 | #include <stddef.h> /* for size_t */ |
| 10 | #include <stdbool.h> /* for bool */ |
| 11 | |
| 12 | extern const char test_llvm__bpf_base_prog[]; |
Wang Nan | 7af3f3d | 2015-11-06 13:49:42 +0000 | [diff] [blame] | 13 | extern const char test_llvm__bpf_test_kbuild_prog[]; |
Wang Nan | bbb7d49 | 2015-11-16 12:10:14 +0000 | [diff] [blame] | 14 | extern const char test_llvm__bpf_test_prologue_prog[]; |
Wang Nan | 7b6982c | 2016-01-25 09:55:48 +0000 | [diff] [blame] | 15 | extern const char test_llvm__bpf_test_relocation[]; |
Wang Nan | b31de01 | 2015-11-06 13:49:41 +0000 | [diff] [blame] | 16 | |
| 17 | enum test_llvm__testcase { |
| 18 | LLVM_TESTCASE_BASE, |
Wang Nan | 7af3f3d | 2015-11-06 13:49:42 +0000 | [diff] [blame] | 19 | LLVM_TESTCASE_KBUILD, |
Wang Nan | bbb7d49 | 2015-11-16 12:10:14 +0000 | [diff] [blame] | 20 | LLVM_TESTCASE_BPF_PROLOGUE, |
Wang Nan | 7b6982c | 2016-01-25 09:55:48 +0000 | [diff] [blame] | 21 | LLVM_TESTCASE_BPF_RELOCATION, |
Wang Nan | b31de01 | 2015-11-06 13:49:41 +0000 | [diff] [blame] | 22 | __LLVM_TESTCASE_MAX, |
| 23 | }; |
| 24 | |
| 25 | int test_llvm__fetch_bpf_obj(void **p_obj_buf, size_t *p_obj_buf_sz, |
Wang Nan | 7b6982c | 2016-01-25 09:55:48 +0000 | [diff] [blame] | 26 | enum test_llvm__testcase index, bool force, |
| 27 | bool *should_load_fail); |
Wang Nan | e67d52d | 2016-11-26 07:03:37 +0000 | [diff] [blame] | 28 | #ifdef __cplusplus |
| 29 | } |
| 30 | #endif |
Wang Nan | b31de01 | 2015-11-06 13:49:41 +0000 | [diff] [blame] | 31 | #endif |