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()
94 return std::unique_ptr<llvm::Module>(nullptr); in getModuleFromSource()
99 std::unique_ptr<llvm::Module>
100 getModuleFromSource(llvm::opt::ArgStringList CFlags, in getModuleFromSource()
105 llvm::IntrusiveRefCntPtr<OverlayFileSystem> OverlayFS( in getModuleFromSource()
107 llvm::IntrusiveRefCntPtr<InMemoryFileSystem> MemFS( in getModuleFromSource()
115 MemFS->addFile(Twine(Name), 0, llvm::MemoryBuffer::getMemBuffer(Content)); in getModuleFromSource()
120 std::unique_ptr<llvm::Module>
121 getModuleFromSource(llvm::opt::ArgStringList CFlags, StringRef Path) in getModuleFromSource()
127 std::unique_ptr<llvm::SmallVectorImpl<char>>
128 getBPFObjectFromModule(llvm::Module *Module) in getBPFObjectFromModule()
130 using namespace llvm; in getBPFObjectFromModule()
136 llvm::errs() << Error; in getBPFObjectFromModule()
137 return std::unique_ptr<llvm::SmallVectorImpl<char>>(nullptr); in getBPFObjectFromModule()
140 llvm::TargetOptions Opt; in getBPFObjectFromModule()
162 llvm::errs() << "TargetMachine can't emit a file of this type\n"; in getBPFObjectFromModule()
163 return std::unique_ptr<llvm::SmallVectorImpl<char>>(nullptr); in getBPFObjectFromModule()
175 perf::LLVMCtx.reset(new llvm::LLVMContext()); in perf_clang__init()
185 llvm::llvm_shutdown(); in perf_clang__cleanup()
197 llvm::opt::ArgStringList CFlags; in perf_clang__compile_bpf()