1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef PERF_UTIL_CLANG_H
3 #define PERF_UTIL_CLANG_H
5 #include "llvm/ADT/StringRef.h"
6 #include "llvm/IR/LLVMContext.h"
7 #include "llvm/IR/Module.h"
8 #include "llvm/Option/Option.h"
15 std::unique_ptr
<Module
>
16 getModuleFromSource(opt::ArgStringList CFlags
,
17 StringRef Name
, StringRef Content
);
19 std::unique_ptr
<Module
>
20 getModuleFromSource(opt::ArgStringList CFlags
,
23 std::unique_ptr
<llvm::SmallVectorImpl
<char>>
24 getBPFObjectFromModule(llvm::Module
*Module
);