clang.h 548 B

1234567891011121314151617181920212223242526
  1. #ifndef PERF_UTIL_CLANG_H
  2. #define PERF_UTIL_CLANG_H
  3. #include "llvm/ADT/StringRef.h"
  4. #include "llvm/IR/LLVMContext.h"
  5. #include "llvm/IR/Module.h"
  6. #include "llvm/Option/Option.h"
  7. #include <memory>
  8. namespace perf {
  9. using namespace llvm;
  10. std::unique_ptr<Module>
  11. getModuleFromSource(opt::ArgStringList CFlags,
  12. StringRef Name, StringRef Content);
  13. std::unique_ptr<Module>
  14. getModuleFromSource(opt::ArgStringList CFlags,
  15. StringRef Path);
  16. std::unique_ptr<llvm::SmallVectorImpl<char>>
  17. getBPFObjectFromModule(llvm::Module *Module);
  18. }
  19. #endif