Lines Matching refs:llvm
34 static std::unique_ptr<llvm::LLVMContext> LLVMCtx;
39 createCompilerInvocation(llvm::opt::ArgStringList CFlags, StringRef& Path, in createCompilerInvocation()
42 llvm::opt::ArgStringList CCArgs { in createCompilerInvocation()
69 static std::unique_ptr<llvm::Module>
70 getModuleFromSource(llvm::opt::ArgStringList CFlags, in getModuleFromSource()
96 return std::unique_ptr<llvm::Module>(nullptr); in getModuleFromSource()
101 std::unique_ptr<llvm::Module>
102 getModuleFromSource(llvm::opt::ArgStringList CFlags, in getModuleFromSource()
107 llvm::IntrusiveRefCntPtr<OverlayFileSystem> OverlayFS( in getModuleFromSource()
109 llvm::IntrusiveRefCntPtr<InMemoryFileSystem> MemFS( in getModuleFromSource()
117 MemFS->addFile(Twine(Name), 0, llvm::MemoryBuffer::getMemBuffer(Content)); in getModuleFromSource()
122 std::unique_ptr<llvm::Module>
123 getModuleFromSource(llvm::opt::ArgStringList CFlags, StringRef Path) in getModuleFromSource()
129 std::unique_ptr<llvm::SmallVectorImpl<char>>
130 getBPFObjectFromModule(llvm::Module *Module) in getBPFObjectFromModule()
132 using namespace llvm; in getBPFObjectFromModule()
138 llvm::errs() << Error; in getBPFObjectFromModule()
139 return std::unique_ptr<llvm::SmallVectorImpl<char>>(nullptr); in getBPFObjectFromModule()
142 llvm::TargetOptions Opt; in getBPFObjectFromModule()
163 , llvm::CGFT_ObjectFile in getBPFObjectFromModule()
167 llvm::errs() << "TargetMachine can't emit a file of this type\n"; in getBPFObjectFromModule()
168 return std::unique_ptr<llvm::SmallVectorImpl<char>>(nullptr); in getBPFObjectFromModule()
180 perf::LLVMCtx.reset(new llvm::LLVMContext()); in perf_clang__init()
190 llvm::llvm_shutdown(); in perf_clang__cleanup()
202 llvm::opt::ArgStringList CFlags; in perf_clang__compile_bpf()