Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef PERF_UTIL_CLANG_H
0003 #define PERF_UTIL_CLANG_H
0004 
0005 #include "llvm/ADT/StringRef.h"
0006 #include "llvm/IR/LLVMContext.h"
0007 #include "llvm/IR/Module.h"
0008 #include "llvm/Option/Option.h"
0009 #include <memory>
0010 
0011 namespace perf {
0012 
0013 using namespace llvm;
0014 
0015 std::unique_ptr<Module>
0016 getModuleFromSource(opt::ArgStringList CFlags,
0017             StringRef Name, StringRef Content);
0018 
0019 std::unique_ptr<Module>
0020 getModuleFromSource(opt::ArgStringList CFlags,
0021             StringRef Path);
0022 
0023 std::unique_ptr<llvm::SmallVectorImpl<char>>
0024 getBPFObjectFromModule(llvm::Module *Module);
0025 
0026 }
0027 #endif