2016-11-26 15:03:34 +08:00
|
|
|
#ifndef PERF_UTIL_CLANG_H
|
|
|
|
#define PERF_UTIL_CLANG_H
|
|
|
|
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
#include "llvm/IR/LLVMContext.h"
|
|
|
|
#include "llvm/IR/Module.h"
|
2016-11-26 15:03:36 +08:00
|
|
|
#include "llvm/Option/Option.h"
|
2016-11-26 15:03:34 +08:00
|
|
|
#include <memory>
|
2016-11-26 15:03:36 +08:00
|
|
|
|
2016-11-26 15:03:34 +08:00
|
|
|
namespace perf {
|
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
std::unique_ptr<Module>
|
2016-11-26 15:03:36 +08:00
|
|
|
getModuleFromSource(opt::ArgStringList CFlags,
|
|
|
|
StringRef Name, StringRef Content);
|
2016-11-26 15:03:34 +08:00
|
|
|
|
2016-11-26 15:03:35 +08:00
|
|
|
std::unique_ptr<Module>
|
2016-11-26 15:03:36 +08:00
|
|
|
getModuleFromSource(opt::ArgStringList CFlags,
|
|
|
|
StringRef Path);
|
2016-11-26 15:03:35 +08:00
|
|
|
|
2016-11-26 15:03:38 +08:00
|
|
|
std::unique_ptr<llvm::SmallVectorImpl<char>>
|
|
|
|
getBPFObjectFromModule(llvm::Module *Module);
|
|
|
|
|
2016-11-26 15:03:34 +08:00
|
|
|
}
|
|
|
|
#endif
|