mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 19:55:28 +07:00
630aec1a7f
It was put in place just to make sure the 'new' C++ operator wouldn't clash with some argument name in util.h, but there is not anymore any such argument and also the reason stated for util.h to be included there was to get the __maybe_unused definition, that is in linux/compiler.h, so use that instead and nuke util-cxx.h. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-1r5tvfnwiydjxhukgqs6bi11@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
46 lines
981 B
C
46 lines
981 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef PERF_UTIL_CLANG_C_H
|
|
#define PERF_UTIL_CLANG_C_H
|
|
|
|
#include <stddef.h> /* for size_t */
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifdef HAVE_LIBCLANGLLVM_SUPPORT
|
|
extern void perf_clang__init(void);
|
|
extern void perf_clang__cleanup(void);
|
|
|
|
extern int test__clang_to_IR(void);
|
|
extern int test__clang_to_obj(void);
|
|
|
|
extern int perf_clang__compile_bpf(const char *filename,
|
|
void **p_obj_buf,
|
|
size_t *p_obj_buf_sz);
|
|
#else
|
|
|
|
#include <errno.h>
|
|
#include <linux/compiler.h> /* for __maybe_unused */
|
|
|
|
static inline void perf_clang__init(void) { }
|
|
static inline void perf_clang__cleanup(void) { }
|
|
|
|
static inline int test__clang_to_IR(void) { return -1; }
|
|
static inline int test__clang_to_obj(void) { return -1;}
|
|
|
|
static inline int
|
|
perf_clang__compile_bpf(const char *filename __maybe_unused,
|
|
void **p_obj_buf __maybe_unused,
|
|
size_t *p_obj_buf_sz __maybe_unused)
|
|
{
|
|
return -ENOTSUP;
|
|
}
|
|
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|