Home
last modified time | relevance | path

Searched refs:BufferOrErr (Results 1 – 22 of 22) sorted by relevance

/freebsd/contrib/llvm-project/llvm/tools/llvm-tapi-diff/
H A Dllvm-tapi-diff.cpp
/freebsd/contrib/llvm-project/clang/lib/ExtractAPI/
H A DAPIIgnoresList.cpp41 auto BufferOrErr = FM.getBufferForFile(CurrentIgnoresFilePath); in create() local
43 if (!BufferOrErr) in create()
46 auto Buffer = std::move(BufferOrErr.get()); in create()
/freebsd/contrib/llvm-project/llvm/lib/ObjCopy/wasm/
H A DWasmObjcopy.cpp45 Expected<std::unique_ptr<FileOutputBuffer>> BufferOrErr = in dumpSectionToFile() local
47 if (!BufferOrErr) in dumpSectionToFile()
48 return BufferOrErr.takeError(); in dumpSectionToFile()
49 std::unique_ptr<FileOutputBuffer> Buf = std::move(*BufferOrErr); in dumpSectionToFile()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DReplayInlineAdvisor.cpp34 auto BufferOrErr = MemoryBuffer::getFileOrSTDIN(ReplaySettings.ReplayFile); in ReplayInlineAdvisor() local
35 std::error_code EC = BufferOrErr.getError(); in ReplayInlineAdvisor()
45 line_iterator LineIt(*BufferOrErr.get(), /*SkipBlanks=*/true); in ReplayInlineAdvisor()
/freebsd/contrib/llvm-project/llvm/lib/LTO/
H A DLTOModule.cpp64 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = in isBitcodeFile() local
66 if (!BufferOrErr) in isBitcodeFile()
70 BufferOrErr.get()->getMemBufferRef()); in isBitcodeFile()
113 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = in createFromFile() local
115 if (std::error_code EC = BufferOrErr.getError()) { in createFromFile()
119 std::unique_ptr<MemoryBuffer> Buffer = std::move(BufferOrErr.get()); in createFromFile()
134 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = in createFromOpenFileSlice() local
137 if (std::error_code EC = BufferOrErr.getError()) { in createFromOpenFileSlice()
141 std::unique_ptr<MemoryBuffer> Buffer = std::move(BufferOrErr.get()); in createFromOpenFileSlice()
H A DLTOCodeGenerator.cpp359 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = MemoryBuffer::getFile( in compileOptimized() local
361 if (std::error_code EC = BufferOrErr.getError()) { in compileOptimized()
370 return std::move(*BufferOrErr); in compileOptimized()
/freebsd/contrib/llvm-project/llvm/lib/ProfileData/
H A DInstrProfCorrelator.cpp109 auto BufferOrErr = errorOrToExpected(MemoryBuffer::getFile(Filename)); in get() local
110 if (auto Err = BufferOrErr.takeError()) in get()
113 return get(std::move(*BufferOrErr), FileKind); in get()
116 auto BufferOrErr = errorOrToExpected(MemoryBuffer::getFile(Filename)); in get() local
117 if (auto Err = BufferOrErr.takeError()) in get()
120 return get(std::move(*BufferOrErr), FileKind); in get()
H A DGCOV.cpp614 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = in LineConsumer() local
617 if (std::error_code EC = BufferOrErr.getError()) { in LineConsumer()
621 Buffer = std::move(BufferOrErr.get()); in LineConsumer()
H A DInstrProfReader.cpp73 auto BufferOrErr = Filename.str() == "-" ? MemoryBuffer::getSTDIN() in setupMemoryBuffer() local
75 if (std::error_code EC = BufferOrErr.getError()) in setupMemoryBuffer()
77 return std::move(BufferOrErr.get()); in setupMemoryBuffer()
H A DSampleProfReader.cpp1805 auto BufferOrErr = Filename.str() == "-" ? MemoryBuffer::getSTDIN() in setupMemoryBuffer() local
1807 if (std::error_code EC = BufferOrErr.getError()) in setupMemoryBuffer()
1809 auto Buffer = std::move(BufferOrErr.get()); in setupMemoryBuffer()
/freebsd/contrib/llvm-project/llvm/tools/llvm-dis/
H A Dllvm-dis.cpp191 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = in main() local
193 if (std::error_code EC = BufferOrErr.getError()) { in main()
197 std::unique_ptr<MemoryBuffer> MB = std::move(BufferOrErr.get()); in main()
/freebsd/contrib/llvm-project/clang/lib/Driver/ToolChains/
H A DHIPUtility.cpp119 auto BufferOrErr = llvm::MemoryBuffer::getFile(Filename); in populateSymbols() local
123 if (!BufferOrErr) in populateSymbols()
126 processInput(BufferOrErr.get()->getMemBufferRef()); in populateSymbols()
/freebsd/contrib/llvm-project/llvm/lib/ObjCopy/MachO/
H A DMachOObjcopy.cpp294 Expected<std::unique_ptr<FileOutputBuffer>> BufferOrErr = in dumpSectionToFile()
296 if (!BufferOrErr) in dumpSectionToFile()
297 return BufferOrErr.takeError(); in dumpSectionToFile()
298 std::unique_ptr<FileOutputBuffer> Buf = std::move(*BufferOrErr); in dumpSectionToFile()
286 Expected<std::unique_ptr<FileOutputBuffer>> BufferOrErr = dumpSectionToFile() local
/freebsd/contrib/llvm-project/llvm/lib/Remarks/
H A DYAMLRemarkParser.cpp148 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = in createYAMLParserFromMeta()
150 if (std::error_code EC = BufferOrErr.getError()) in createYAMLParserFromMeta() local
154 SeparateBuf = std::move(*BufferOrErr); in createYAMLParserFromMeta()
H A DBitstreamRemarkParser.cpp428 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = in processExternalFilePath() local
430 if (std::error_code EC = BufferOrErr.getError()) in processExternalFilePath()
433 TmpRemarkBuffer = std::move(*BufferOrErr); in processExternalFilePath()
/freebsd/contrib/llvm-project/llvm/tools/llvm-link/
H A Dllvm-link.cpp405 auto BufferOrErr = MemoryBuffer::getFileOrSTDIN(File); in linkFiles() local
408 if (auto EC = BufferOrErr.getError()) in linkFiles()
414 ExitOnErr(errorOrToExpected(std::move(BufferOrErr))); in linkFiles()
/freebsd/contrib/llvm-project/llvm/tools/llvm-lto/
H A Dllvm-lto.cpp363 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = in getLocalLTOModule() local
365 error(BufferOrErr, "error loading file '" + Path + "'"); in getLocalLTOModule()
366 Buffer = std::move(BufferOrErr.get()); in getLocalLTOModule()
995 std::unique_ptr<MemoryBuffer> BufferOrErr = in main() local
997 auto Buffer = std::move(BufferOrErr.get()); in main()
/freebsd/contrib/llvm-project/clang/lib/Serialization/
H A DGlobalModuleIndex.cpp258 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> BufferOrErr = in readIndex() local
260 if (!BufferOrErr) in readIndex()
262 llvm::errorCodeToError(BufferOrErr.getError())); in readIndex()
263 std::unique_ptr<llvm::MemoryBuffer> Buffer = std::move(BufferOrErr.get()); in readIndex()
H A DASTReader.cpp5418 auto BufferOrErr = FileMgr.getBufferForFile(Filename); in readASTFileControlBlock() local
5419 if (!BufferOrErr) in readASTFileControlBlock()
5421 OwnedBuffer = std::move(*BufferOrErr); in readASTFileControlBlock()
/freebsd/contrib/llvm-project/llvm/lib/ObjCopy/ELF/
H A DELFObjcopy.cpp201 Expected<std::unique_ptr<FileOutputBuffer>> BufferOrErr = in dumpSectionToFile() local
203 if (!BufferOrErr) in dumpSectionToFile()
204 return BufferOrErr.takeError(); in dumpSectionToFile()
205 std::unique_ptr<FileOutputBuffer> Buf = std::move(*BufferOrErr); in dumpSectionToFile()
/freebsd/contrib/llvm-project/llvm/tools/llvm-nm/
H A Dllvm-nm.cpp2353 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = in dumpSymbolNamesFromFile() local
2355 if (error(BufferOrErr.getError(), Filename)) in dumpSymbolNamesFromFile()
2360 const char *BuffStart = (*BufferOrErr)->getBufferStart(); in dumpSymbolNamesFromFile()
2361 size_t BufferSize = (*BufferOrErr)->getBufferSize(); in dumpSymbolNamesFromFile()
2369 createBinary(BufferOrErr.get()->getMemBufferRef(), ContextPtr); in dumpSymbolNamesFromFile()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DFunctionImport.cpp613 auto BufferOrErr = MemoryBuffer::getFileOrSTDIN(WorkloadDefinitions); in WorkloadImportsManager() local
614 if (std::error_code EC = BufferOrErr.getError()) { in WorkloadImportsManager()
618 auto Buffer = std::move(BufferOrErr.get()); in WorkloadImportsManager()