Home
last modified time | relevance | path

Searched refs:ErrorOr (Results 1 – 25 of 301) sorted by relevance

12345678910>>...13

/llvm-project-15.0.7/llvm/unittests/Support/
H A DErrorOrTest.cpp21 TEST(ErrorOr, SimpleValue) { in TEST() argument
22 ErrorOr<int> a = t1(); in TEST()
28 ErrorOr<int> b = a; in TEST()
43 TEST(ErrorOr, Types) { in TEST() argument
45 ErrorOr<int&> a(x); in TEST()
56 TEST(ErrorOr, Covariant) { in TEST() argument
57 ErrorOr<B*> b(ErrorOr<D*>(nullptr)); in TEST()
58 b = ErrorOr<D*>(nullptr); in TEST()
60 ErrorOr<std::unique_ptr<B> > b1(ErrorOr<std::unique_ptr<D> >(nullptr)); in TEST()
63 ErrorOr<std::unique_ptr<int>> b2(ErrorOr<int *>(nullptr)); in TEST()
[all …]
/llvm-project-15.0.7/llvm/include/llvm/Support/
H A DErrorOr.h56 class ErrorOr {
74 ErrorOr(E ErrorCode,
93 ErrorOr(const ErrorOr &Other) { in ErrorOr() function
98 ErrorOr(const ErrorOr<OtherT> &Other,
104 explicit ErrorOr(
111 ErrorOr(ErrorOr &&Other) { in ErrorOr() function
116 ErrorOr(ErrorOr<OtherT> &&Other,
124 explicit ErrorOr(
130 ErrorOr &operator=(const ErrorOr &Other) {
135 ErrorOr &operator=(ErrorOr &&Other) {
[all …]
H A DMemoryBuffer.h93 static ErrorOr<std::unique_ptr<MemoryBuffer>>
100 static ErrorOr<std::unique_ptr<MemoryBuffer>>
106 static ErrorOr<std::unique_ptr<MemoryBuffer>>
116 static ErrorOr<std::unique_ptr<MemoryBuffer>>
135 static ErrorOr<std::unique_ptr<MemoryBuffer>> getSTDIN();
139 static ErrorOr<std::unique_ptr<MemoryBuffer>>
144 static ErrorOr<std::unique_ptr<MemoryBuffer>>
190 static ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
194 static ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
248 static ErrorOr<std::unique_ptr<WriteThroughMemoryBuffer>>
[all …]
H A DVirtualFileSystem.h122 virtual llvm::ErrorOr<Status> status() = 0;
125 virtual llvm::ErrorOr<std::string> getName() { in getName()
133 virtual llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
141 static ErrorOr<std::unique_ptr<File>>
276 virtual llvm::ErrorOr<std::unique_ptr<File>>
281 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
381 llvm::ErrorOr<std::unique_ptr<File>>
432 llvm::ErrorOr<std::unique_ptr<File>>
588 llvm::ErrorOr<std::unique_ptr<File>>
957 ErrorOr<LookupResult> lookupPath(StringRef Path) const;
[all …]
/llvm-project-15.0.7/bolt/lib/Passes/
H A DStackReachingUses.cpp25 if (ErrorOr<const FrameIndexEntry &> FIEY = FA.getFIEFor(*ReachingInst)) { in isLoadedInDifferentReg()
42 if (ErrorOr<const FrameIndexEntry &> FIEY = FA.getFIEFor(*ReachingInst)) { in isStoreUsed()
49 ErrorOr<const ArgAccesses &> Args = FA.getArgAccessesFor(*ReachingInst); in isStoreUsed()
72 if (ErrorOr<const FrameIndexEntry &> FIE = FA.getFIEFor(Inst)) { in preflight()
79 ErrorOr<const ArgAccesses &> AA = FA.getArgAccessesFor(Inst); in preflight()
91 ErrorOr<const FrameIndexEntry &> FIEX = FA.getFIEFor(*X); in doesXKillsY()
92 ErrorOr<const FrameIndexEntry &> FIEY = FA.getFIEFor(*Y); in doesXKillsY()
116 if (ErrorOr<const FrameIndexEntry &> FIE = FA.getFIEFor(Point)) { in computeNext()
120 ErrorOr<const ArgAccesses &> AA = FA.getArgAccessesFor(Point); in computeNext()
H A DStackAvailableExpressions.cpp37 ErrorOr<const FrameIndexEntry &> FIE = FA.getFIEFor(Inst); in preflight()
84 ErrorOr<const FrameIndexEntry &> FIEX = FA.getFIEFor(*X); in doesXKillsY()
85 ErrorOr<const FrameIndexEntry &> FIEY = FA.getFIEFor(*Y); in doesXKillsY()
125 if (ErrorOr<const FrameIndexEntry &> FIE = FA.getFIEFor(Point)) { in computeNext()
/llvm-project-15.0.7/llvm/lib/Support/
H A DMemoryBuffer.cpp110 static ErrorOr<std::unique_ptr<MB>>
145 ErrorOr<std::unique_ptr<MemoryBuffer>>
157 ErrorOr<std::unique_ptr<MemoryBuffer>>
238 ErrorOr<std::unique_ptr<MemoryBuffer>>
246 static ErrorOr<std::unique_ptr<MB>>
252 static ErrorOr<std::unique_ptr<MB>>
266 ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
427 static ErrorOr<std::unique_ptr<MB>>
497 ErrorOr<std::unique_ptr<MemoryBuffer>>
504 ErrorOr<std::unique_ptr<MemoryBuffer>>
[all …]
H A DVirtualFileSystem.cpp118 ErrorOr<std::unique_ptr<MemoryBuffer>>
197 ErrorOr<Status> status() override;
211 ErrorOr<Status> RealFile::status() { in status()
226 ErrorOr<std::unique_ptr<MemoryBuffer>>
315 ErrorOr<std::unique_ptr<File>>
440 ErrorOr<std::unique_ptr<File>>
451 llvm::ErrorOr<std::string>
1318 llvm::ErrorOr<std::string>
2292 ErrorOr<Status>
2369 ErrorOr<std::unique_ptr<File>>
[all …]
/llvm-project-15.0.7/clang/lib/Tooling/DependencyScanning/
H A DDependencyScanningFilesystem.cpp18 llvm::ErrorOr<DependencyScanningWorkerFilesystem::TentativeEntry>
127 llvm::ErrorOr<llvm::vfs::Status> Stat) { in getOrEmplaceEntryForFilename()
212 llvm::ErrorOr<const CachedFileSystemEntry &>
240 llvm::ErrorOr<EntryRef>
255 llvm::ErrorOr<llvm::vfs::Status>
260 llvm::ErrorOr<EntryRef> Result = getOrCreateFileSystemEntry(Filename); in status()
278 llvm::ErrorOr<llvm::vfs::Status> status() override { return Stat; } in status()
280 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
295 llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
308 return llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>( in create()
[all …]
/llvm-project-15.0.7/clang/include/clang/Basic/
H A DFileManager.h86 llvm::StringMap<llvm::ErrorOr<DirectoryEntry &>, llvm::BumpPtrAllocator>
94 llvm::StringMap<llvm::ErrorOr<FileEntryRef::MapValue>, llvm::BumpPtrAllocator>
101 std::unique_ptr<llvm::StringMap<llvm::ErrorOr<FileEntryRef::MapValue>>>
187 llvm::ErrorOr<const DirectoryEntry *>
204 llvm::ErrorOr<const FileEntry *>
273 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
276 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
284 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
/llvm-project-15.0.7/llvm/include/llvm/ProfileData/
H A DSampleProfReader.h449 static ErrorOr<std::unique_ptr<SampleProfileReader>>
457 static ErrorOr<std::unique_ptr<SampleProfileReader>>
604 template <typename T> ErrorOr<T> readNumber();
608 template <typename T> ErrorOr<T> readUnencodedNumber();
616 ErrorOr<StringRef> readString();
649 virtual ErrorOr<StringRef> readStringFromTable();
719 ErrorOr<StringRef> readStringFromTable() override;
721 ErrorOr<SampleContextFrames> readContextFromTable();
819 ErrorOr<StringRef> readStringFromTable() override;
878 template <typename T> ErrorOr<T> readNumber();
[all …]
/llvm-project-15.0.7/clang/include/clang/Tooling/DependencyScanning/
H A DDependencyScanningFilesystem.h63 CachedFileSystemEntry(llvm::ErrorOr<llvm::vfs::Status> Stat) in CachedFileSystemEntry()
69 CachedFileSystemEntry(llvm::ErrorOr<llvm::vfs::Status> Stat, in CachedFileSystemEntry()
135 llvm::ErrorOr<llvm::vfs::Status> MaybeStat;
183 llvm::ErrorOr<llvm::vfs::Status> Stat);
258 llvm::ErrorOr<EntryRef> unwrapError() const { in unwrapError()
288 llvm::ErrorOr<llvm::vfs::Status> status(const Twine &Path) override;
289 llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
296 llvm::ErrorOr<EntryRef>
307 llvm::ErrorOr<const CachedFileSystemEntry &>
328 llvm::ErrorOr<TentativeEntry> readFile(StringRef Filename);
/llvm-project-15.0.7/bolt/include/bolt/Profile/
H A DDataReader.h128 ErrorOr<const BranchInfo &> getBranch(uint64_t From, uint64_t To) const;
134 ErrorOr<const BranchInfo &> getDirectCallBranch(uint64_t From) const;
468 ErrorOr<StringRef> parseString(char EndChar, bool EndNl = false);
469 ErrorOr<int64_t> parseNumberField(char EndChar, bool EndNl = false);
470 ErrorOr<uint64_t> parseHexField(char EndChar, bool EndNl = false);
472 ErrorOr<Location> parseLocation(char EndChar, bool EndNl = false) {
478 ErrorOr<BranchInfo> parseBranchInfo();
479 ErrorOr<SampleInfo> parseSampleInfo();
480 ErrorOr<MemInfo> parseMemInfo();
481 ErrorOr<bool> maybeParseNoLBRFlag();
[all …]
H A DDataAggregator.h290 ErrorOr<PerfBranchSample> parseBranchSample();
294 ErrorOr<PerfBasicSample> parseBasicSample();
298 ErrorOr<PerfMemSample> parseMemSample();
301 ErrorOr<AggregatedLBREntry> parseAggregatedLBREntry();
305 ErrorOr<Location> parseLocationOrOffset();
315 ErrorOr<LBREntry> parseLBREntry();
342 ErrorOr<std::pair<StringRef, MMapInfo>> parseMMapEvent();
/llvm-project-15.0.7/llvm/include/llvm/LTO/legacy/
H A DLTOModule.h97 static ErrorOr<std::unique_ptr<LTOModule>>
100 static ErrorOr<std::unique_ptr<LTOModule>>
103 static ErrorOr<std::unique_ptr<LTOModule>>
107 static ErrorOr<std::unique_ptr<LTOModule>>
110 static ErrorOr<std::unique_ptr<LTOModule>>
219 static ErrorOr<std::unique_ptr<LTOModule>>
/llvm-project-15.0.7/lldb/include/lldb/Host/linux/
H A DSupport.h18 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
21 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
24 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
/llvm-project-15.0.7/bolt/include/bolt/Rewrite/
H A DRewriteInstance.h526 ErrorOr<BinarySection &> LSDASection{std::errc::bad_address};
527 ErrorOr<BinarySection &> EHFrameSection{std::errc::bad_address};
533 ErrorOr<BinarySection &> GOTPLTSection{std::errc::bad_address};
538 ErrorOr<BinarySection &> RelaPLTSection{std::errc::bad_address};
539 ErrorOr<BinarySection &> RelaDynSection{std::errc::bad_address};
542 ErrorOr<BinarySection &> BuildIDSection{std::errc::bad_address};
546 ErrorOr<BinarySection &> SDTSection{std::errc::bad_address};
551 ErrorOr<BinarySection &> PseudoProbeDescSection{std::errc::bad_address};
555 ErrorOr<BinarySection &> PseudoProbeSection{std::errc::bad_address};
/llvm-project-15.0.7/libc/src/__support/CPP/
H A Derror.h26 template <typename T> class ErrorOr {
35 ErrorOr(const T &value) : is_error(false), val(value) {} in ErrorOr() function
37 ErrorOr(const Error &error) : is_error(true), error(error) {} in ErrorOr() function
/llvm-project-15.0.7/bolt/lib/Profile/
H A DDataAggregator.cpp277 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in processFileBuildID()
287 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in processFileBuildID()
347 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in parsePreAggregated()
500 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in preprocessProfile()
568 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in preprocessProfile()
584 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in preprocessProfile()
994 ErrorOr<StringRef> ToStrRes = parseString('/'); in parseLBREntry()
1084 ErrorOr<LBREntry> LBRRes = parseLBREntry(); in parseBranchSample()
1208 ErrorOr<StringRef> BuildID = parseString(':'); in parseLocationOrOffset()
1217 ErrorOr<DataAggregator::AggregatedLBREntry>
[all …]
H A DDataReader.cpp216 ErrorOr<const BranchInfo &>
340 ErrorOr<std::unique_ptr<MemoryBuffer>> MB = in parseInput()
960 ErrorOr<BranchInfo> DataReader::parseBranchInfo() { in parseBranchInfo()
993 ErrorOr<MemInfo> DataReader::parseMemInfo() { in parseMemInfo()
1040 ErrorOr<bool> DataReader::maybeParseNoLBRFlag() { in maybeParseNoLBRFlag()
1063 ErrorOr<bool> DataReader::maybeParseBATFlag() { in maybeParseBATFlag()
1119 ErrorOr<SampleInfo> Res = parseSampleInfo(); in parseInNoLBRMode()
1134 ErrorOr<MemInfo> Res = parseMemInfo(); in parseInNoLBRMode()
1183 ErrorOr<bool> FlagOrErr = maybeParseNoLBRFlag(); in parse()
1202 ErrorOr<BranchInfo> Res = parseBranchInfo(); in parse()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clangd/support/
H A DThreadsafeFS.cpp32 llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
56 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
63 llvm::ErrorOr<llvm::vfs::Status> status() override { in status()
66 llvm::ErrorOr<std::string> getName() override { return Wrapped->getName(); } in getName()
/llvm-project-15.0.7/llvm/lib/LTO/
H A DLTOModule.cpp64 ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = in isBitcodeFile()
90 ErrorOr<std::string> TripleOrErr = in isBitcodeForTarget()
110 ErrorOr<std::unique_ptr<LTOModule>>
124 ErrorOr<std::unique_ptr<LTOModule>>
130 ErrorOr<std::unique_ptr<LTOModule>>
146 ErrorOr<std::unique_ptr<LTOModule>>
155 ErrorOr<std::unique_ptr<LTOModule>>
163 ErrorOr<std::unique_ptr<LTOModule>> Ret = in createInLocalContext()
170 static ErrorOr<std::unique_ptr<Module>>
194 ErrorOr<std::unique_ptr<LTOModule>>
[all …]
/llvm-project-15.0.7/lldb/source/Host/linux/
H A DSupport.cpp14 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
26 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
36 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
/llvm-project-15.0.7/lldb/source/Host/common/
H A DFileSystem.cpp83 llvm::ErrorOr<vfs::Status>
91 llvm::ErrorOr<vfs::Status> FileSystem::GetStatus(const Twine &path) const { in GetStatus()
103 ErrorOr<vfs::Status> status = m_fs->status(path); in GetModificationTime()
116 ErrorOr<vfs::Status> status = m_fs->status(path); in GetByteSize()
140 ErrorOr<vfs::Status> status = m_fs->status(path); in GetPermissions()
163 ErrorOr<vfs::Status> status = m_fs->status(path); in IsDirectory()
192 ErrorOr<vfs::Status> Status = m_fs->status(Item.path()); in EnumerateDirectory()
343 llvm::ErrorOr<std::string> error_or_path = in ResolveExecutableLocation()
/llvm-project-15.0.7/llvm/include/llvm/Transforms/Utils/
H A DSampleProfileLoaderBaseImpl.h133 virtual ErrorOr<uint64_t> getInstWeight(const InstructionT &Inst);
134 ErrorOr<uint64_t> getInstWeightImpl(const InstructionT &Inst);
135 ErrorOr<uint64_t> getBlockWeight(const BasicBlockT *BB);
292 ErrorOr<uint64_t>
298 ErrorOr<uint64_t>
350 ErrorOr<uint64_t>
355 const ErrorOr<uint64_t> &R = getInstWeight(I);
361 return HasWeight ? ErrorOr<uint64_t>(Max) : std::error_code();
375 ErrorOr<uint64_t> Weight = getBlockWeight(&BB);
762 ErrorOr<uint64_t> Weight = getBlockWeight(&BI);
[all …]

12345678910>>...13