Lines Matching refs:llvm

38 static std::unique_ptr<llvm::LLVMContext> LLVMCtx;
43 createCompilerInvocation(llvm::opt::ArgStringList CFlags, StringRef& Path, in createCompilerInvocation()
46 llvm::opt::ArgStringList CCArgs { in createCompilerInvocation()
73 static std::unique_ptr<llvm::Module>
74 getModuleFromSource(llvm::opt::ArgStringList CFlags, in getModuleFromSource()
100 return std::unique_ptr<llvm::Module>(nullptr); in getModuleFromSource()
105 std::unique_ptr<llvm::Module>
106 getModuleFromSource(llvm::opt::ArgStringList CFlags, in getModuleFromSource()
111 llvm::IntrusiveRefCntPtr<OverlayFileSystem> OverlayFS( in getModuleFromSource()
113 llvm::IntrusiveRefCntPtr<InMemoryFileSystem> MemFS( in getModuleFromSource()
121 MemFS->addFile(Twine(Name), 0, llvm::MemoryBuffer::getMemBuffer(Content)); in getModuleFromSource()
126 std::unique_ptr<llvm::Module>
127 getModuleFromSource(llvm::opt::ArgStringList CFlags, StringRef Path) in getModuleFromSource()
133 std::unique_ptr<llvm::SmallVectorImpl<char>>
134 getBPFObjectFromModule(llvm::Module *Module) in getBPFObjectFromModule()
136 using namespace llvm; in getBPFObjectFromModule()
142 llvm::errs() << Error; in getBPFObjectFromModule()
143 return std::unique_ptr<llvm::SmallVectorImpl<char>>(nullptr); in getBPFObjectFromModule()
146 llvm::TargetOptions Opt; in getBPFObjectFromModule()
167 , llvm::CGFT_ObjectFile in getBPFObjectFromModule()
171 llvm::errs() << "TargetMachine can't emit a file of this type\n"; in getBPFObjectFromModule()
172 return std::unique_ptr<llvm::SmallVectorImpl<char>>(nullptr); in getBPFObjectFromModule()
184 perf::LLVMCtx.reset(new llvm::LLVMContext()); in perf_clang__init()
194 llvm::llvm_shutdown(); in perf_clang__cleanup()
206 llvm::opt::ArgStringList CFlags; in perf_clang__compile_bpf()