mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 00:43:12 +00:00
Allow C++ code to use util.h and tests/llvm.h. Let 'perf test' compile a real BPF script. Signed-off-by: Wang Nan <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: He Kuang <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Joe Stringer <[email protected]> Cc: Zefan Li <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
27 lines
421 B
C
27 lines
421 B
C
/*
|
|
* Support C++ source use utilities defined in util.h
|
|
*/
|
|
|
|
#ifndef PERF_UTIL_UTIL_CXX_H
|
|
#define PERF_UTIL_UTIL_CXX_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
* Now 'new' is the only C++ keyword found in util.h:
|
|
* in tools/include/linux/rbtree.h
|
|
*
|
|
* Other keywords, like class and delete, should be
|
|
* redefined if necessary.
|
|
*/
|
|
#define new _new
|
|
#include "util.h"
|
|
#undef new
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|