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()
67 static std::unique_ptr<llvm::Module>
68 getModuleFromSource(llvm::opt::ArgStringList CFlags, in getModuleFromSource()
90 return std::unique_ptr<llvm::Module>(nullptr); in getModuleFromSource()
95 std::unique_ptr<llvm::Module>
96 getModuleFromSource(llvm::opt::ArgStringList CFlags, in getModuleFromSource()
101 llvm::IntrusiveRefCntPtr<OverlayFileSystem> OverlayFS( in getModuleFromSource()
103 llvm::IntrusiveRefCntPtr<InMemoryFileSystem> MemFS( in getModuleFromSource()
111 MemFS->addFile(Twine(Name), 0, llvm::MemoryBuffer::getMemBuffer(Content)); in getModuleFromSource()
116 std::unique_ptr<llvm::Module>
117 getModuleFromSource(llvm::opt::ArgStringList CFlags, StringRef Path) in getModuleFromSource()
123 std::unique_ptr<llvm::SmallVectorImpl<char>>
124 getBPFObjectFromModule(llvm::Module *Module) in getBPFObjectFromModule()
126 using namespace llvm; in getBPFObjectFromModule()
132 llvm::errs() << Error; in getBPFObjectFromModule()
133 return std::unique_ptr<llvm::SmallVectorImpl<char>>(nullptr); in getBPFObjectFromModule()
136 llvm::TargetOptions Opt; in getBPFObjectFromModule()
158 llvm::errs() << "TargetMachine can't emit a file of this type\n"; in getBPFObjectFromModule()
159 return std::unique_ptr<llvm::SmallVectorImpl<char>>(nullptr);; in getBPFObjectFromModule()
171 perf::LLVMCtx.reset(new llvm::LLVMContext()); in perf_clang__init()
181 llvm::llvm_shutdown(); in perf_clang__cleanup()
193 llvm::opt::ArgStringList CFlags; in perf_clang__compile_bpf()