clang.h 587 B

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