| /openbsd-src/gnu/llvm/llvm/tools/llvm-rc/ |
| H A D | ResourceScriptParser.h | 32 using ParseType = Expected<std::unique_ptr<RCResource>>; 33 using ParseOptionType = Expected<std::unique_ptr<OptionalStmt>>; 38 ParserError(const Twine &Expected, const LocIter CurLoc, const LocIter End); 80 Expected<RCInt> readInt(); // Parse an integer. 81 Expected<StringRef> readString(); // Parse a string. 82 Expected<StringRef> readIdentifier(); // Parse an identifier. 83 Expected<StringRef> readFilename(); // Parse a filename. 84 Expected<IntOrString> readIntOrString(); // Parse an integer or a string. 85 Expected<IntOrString> readTypeOrName(); // Parse an integer or an identifier. 88 Expected<IntWithNotMask> parseIntExpr1(); [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Object/ |
| H A D | Archive.h | 49 virtual Expected<StringRef> getRawName() const = 0; 56 virtual Expected<StringRef> getName(uint64_t Size) const = 0; 57 virtual Expected<uint64_t> getSize() const = 0; 61 virtual Expected<const char *> getNextChildLoc() const = 0; 62 virtual Expected<bool> isThin() const = 0; 64 Expected<sys::fs::perms> getAccessMode() const; 65 Expected<sys::TimePoint<std::chrono::seconds>> getLastModified() const; 66 Expected<unsigned> getUID() const; 67 Expected<unsigned> getGID() const; 111 Expected<StringRef> getRawName() const override; [all …]
|
| H A D | ELF.h | 107 Expected<T> operator[](uint64_t N) { 196 Expected<const T *> getEntry(uint32_t Section, uint32_t Entry) const; 198 Expected<const T *> getEntry(const Elf_Shdr &Section, uint32_t Entry) const; 200 Expected<std::vector<VerDef>> 202 Expected<std::vector<VerNeed>> getVersionDependencies( 205 Expected<StringRef> getSymbolVersionByIndex( 210 Expected<StringRef> 213 Expected<StringRef> getStringTableForSymtab(const Elf_Shdr &Section) const; 214 Expected<StringRef> getStringTableForSymtab(const Elf_Shdr &Section, 216 Expected<StringRef> getLinkAsStrtab(const typename ELFT::Shdr &Sec) const; [all …]
|
| H A D | ObjectFile.h | 96 Expected<StringRef> getName() const; 100 Expected<StringRef> getContents() const; 138 Expected<section_iterator> getRelocatedSection() const; 186 Expected<StringRef> getName() const; 189 Expected<uint64_t> getAddress() const; 193 Expected<uint64_t> getValue() const; 198 Expected<SymbolRef::Type> getType() const; 202 Expected<section_iterator> getSection() const; 248 virtual Expected<StringRef> getSymbolName(DataRefImpl Symb) const = 0; 251 virtual Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const = 0; [all …]
|
| H A D | Minidump.h | 28 static Expected<std::unique_ptr<MinidumpFile>> create(MemoryBufferRef Source); 50 Expected<ArrayRef<uint8_t>> 57 Expected<std::string> getString(size_t Offset) const; 63 Expected<const minidump::SystemInfo &> getSystemInfo() const { in getSystemInfo() 72 Expected<ArrayRef<minidump::Module>> getModuleList() const { in getModuleList() 81 Expected<ArrayRef<minidump::Thread>> getThreadList() const { in getThreadList() 89 Expected<const minidump::ExceptionStream &> getExceptionStream() const { in getExceptionStream() 101 Expected<ArrayRef<minidump::MemoryDescriptor>> getMemoryList() const { in getMemoryList() 142 Expected<iterator_range<MemoryInfoIterator>> getMemoryInfoList() const; 155 static Expected<ArrayRef<uint8_t>> getDataSlice(ArrayRef<uint8_t> Data, [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Remarks/ |
| H A D | YAMLRemarkParser.cpp | 61 static Expected<bool> parseMagic(StringRef &Buf) { in parseMagic() 71 static Expected<uint64_t> parseVersion(StringRef &Buf) { in parseVersion() 88 static Expected<uint64_t> parseStrTabSize(StringRef &Buf) { in parseStrTabSize() 99 static Expected<ParsedStringTable> parseStrTab(StringRef &Buf, in parseStrTab() 108 return Expected<ParsedStringTable>(std::move(Result)); in parseStrTab() 111 Expected<std::unique_ptr<YAMLRemarkParser>> remarks::createYAMLParserFromMeta( in createYAMLParserFromMeta() 115 Expected<bool> isMeta = parseMagic(Buf); in createYAMLParserFromMeta() 121 Expected<uint64_t> Version = parseVersion(Buf); in createYAMLParserFromMeta() 125 Expected<uint64_t> StrTabSize = parseStrTabSize(Buf); in createYAMLParserFromMeta() 134 Expected<ParsedStringTable> MaybeStrTab = parseStrTab(Buf, *StrTabSize); in createYAMLParserFromMeta() [all …]
|
| H A D | YAMLRemarkParser.h | 66 Expected<std::unique_ptr<Remark>> next() override; 81 Expected<std::unique_ptr<Remark>> parseRemark(yaml::Document &Remark); 83 Expected<Type> parseType(yaml::MappingNode &Node); 85 Expected<StringRef> parseKey(yaml::KeyValueNode &Node); 87 virtual Expected<StringRef> parseStr(yaml::KeyValueNode &Node); 89 Expected<unsigned> parseUnsigned(yaml::KeyValueNode &Node); 91 Expected<RemarkLocation> parseDebugLoc(yaml::KeyValueNode &Node); 93 Expected<Argument> parseArg(yaml::Node &Node); 107 Expected<StringRef> parseStr(yaml::KeyValueNode &Node) override; 110 Expected<std::unique_ptr<YAMLRemarkParser>> createYAMLParserFromMeta(
|
| H A D | RemarkLinker.cpp | 29 static Expected<StringRef> 38 Expected<std::optional<StringRef>> 40 Expected<StringRef> SectionName = getRemarksSectionName(Obj); in getRemarksSectionContents() 45 Expected<StringRef> MaybeName = Section.getName(); in getRemarksSectionContents() 51 if (Expected<StringRef> Contents = Section.getContents()) in getRemarksSectionContents() 74 Expected<Format> ParserFormat = magicToFormat(Buffer); in link() 80 Expected<std::unique_ptr<RemarkParser>> MaybeParser = in link() 91 Expected<std::unique_ptr<Remark>> Next = Parser.next(); in link() 110 Expected<std::optional<StringRef>> SectionOrErr = in link() 121 Expected<std::unique_ptr<RemarkSerializer>> MaybeSerializer = in serialize()
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/DebugInfo/Symbolize/ |
| H A D | Symbolize.h | 77 Expected<DILineInfo> symbolizeCode(const ObjectFile &Obj, 79 Expected<DILineInfo> symbolizeCode(const std::string &ModuleName, 81 Expected<DILineInfo> symbolizeCode(ArrayRef<uint8_t> BuildID, 83 Expected<DIInliningInfo> 86 Expected<DIInliningInfo> 89 Expected<DIInliningInfo> 93 Expected<DIGlobal> symbolizeData(const ObjectFile &Obj, 95 Expected<DIGlobal> symbolizeData(const std::string &ModuleName, 97 Expected<DIGlobal> symbolizeData(ArrayRef<uint8_t> BuildID, 99 Expected<std::vector<DILocal>> [all …]
|
| /openbsd-src/gnu/llvm/clang/include/clang/AST/ |
| H A D | ASTImporter.h | 266 virtual Expected<Decl *> ImportImpl(Decl *From); 315 llvm::Expected<ExprWithCleanups::CleanupObject> 322 llvm::Expected<const Type *> Import(const Type *FromT); 328 llvm::Expected<QualType> Import(QualType FromT); 335 llvm::Expected<TypeSourceInfo *> Import(TypeSourceInfo *FromTSI); 342 llvm::Expected<Attr *> Import(const Attr *FromAttr); 349 llvm::Expected<Decl *> Import(Decl *FromD); 350 llvm::Expected<const Decl *> Import(const Decl *FromD) { in Import() 354 llvm::Expected<InheritedConstructor> 385 llvm::Expected<DeclContext *> ImportContext(DeclContext *FromDC); [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Bitstream/Reader/ |
| H A D | BitstreamReader.cpp | 40 Expected<uint32_t> MaybeVBR = ReadVBR(bitc::CodeLenWidth); in EnterSubBlock() 52 Expected<word_t> MaybeNum = Read(bitc::BlockSizeWidth); in EnterSubBlock() 71 static Expected<uint64_t> readAbbreviatedField(BitstreamCursor &Cursor, in readAbbreviatedField() 87 if (Expected<unsigned> Res = Cursor.Read(6)) in readAbbreviatedField() 96 Expected<unsigned> BitstreamCursor::skipRecord(unsigned AbbrevID) { in skipRecord() 99 Expected<uint32_t> MaybeCode = ReadVBR(6); in skipRecord() 103 Expected<uint32_t> MaybeVBR = ReadVBR(6); in skipRecord() 108 if (Expected<uint64_t> Res = ReadVBR64(6)) in skipRecord() 115 Expected<const BitCodeAbbrev *> MaybeAbbv = getAbbrev(AbbrevID); in skipRecord() 130 Expected<uint64_t> MaybeCode = readAbbreviatedField(*this, CodeOp); in skipRecord() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Bitcode/ |
| H A D | BitcodeReader.h | 66 ErrorOr<T> expectedToErrorOrAndEmitErrors(LLVMContext &Ctx, Expected<T> Val) { in expectedToErrorOrAndEmitErrors() 120 friend Expected<BitcodeFileContents> 123 Expected<std::unique_ptr<Module>> 141 Expected<std::unique_ptr<Module>> 146 Expected<std::unique_ptr<Module>> 151 Expected<BitcodeLTOInfo> getLTOInfo(); 154 Expected<std::unique_ptr<ModuleSummaryIndex>> getSummary(); 174 Expected<BitcodeFileContents> getBitcodeFileContents(MemoryBufferRef Buffer); 177 Expected<std::vector<BitcodeModule>> 184 Expected<std::unique_ptr<Module>> [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Object/ |
| H A D | Archive.cpp | 55 Expected<StringRef> NameOrErr = ArMemHeader->getName(Size); in createMemberHeaderParseError() 117 Expected<StringRef> NameOrErr = getName(Size); in ArchiveMemberHeader() 147 Expected<StringRef> ArchiveMemberHeader::getRawName() const { in getRawName() 172 Expected<uint64_t> 190 Expected<uint64_t> 208 Expected<StringRef> BigArchiveMemberHeader::getRawName() const { in getRawName() 209 Expected<uint64_t> NameLenOrErr = getArchiveMemberDecField( in getRawName() 237 Expected<StringRef> ArchiveMemberHeader::getName(uint64_t Size) const { in getName() 251 Expected<StringRef> NameOrErr = getRawName(); in getName() 345 Expected<StringRef> BigArchiveMemberHeader::getName(uint64_t Size) const { in getName() [all …]
|
| H A D | IRObjectFile.cpp | 50 Expected<uint32_t> IRObjectFile::getSymbolFlags(DataRefImpl Symb) const { in getSymbolFlags() 73 Expected<MemoryBufferRef> 77 Expected<StringRef> Contents = Sec.getContents(); in findBitcodeInObject() 89 Expected<MemoryBufferRef> 99 Expected<std::unique_ptr<ObjectFile>> ObjFile = in findBitcodeInMemBuffer() 110 Expected<std::unique_ptr<IRObjectFile>> 112 Expected<MemoryBufferRef> BCOrErr = findBitcodeInMemBuffer(Object); in create() 116 Expected<std::vector<BitcodeModule>> BMsOrErr = in create() 123 Expected<std::unique_ptr<Module>> MOrErr = in create() 136 Expected<IRSymtabFile> object::readIRSymtab(MemoryBufferRef MBRef) { in readIRSymtab() [all …]
|
| /openbsd-src/gnu/llvm/compiler-rt/lib/orc/tests/unit/ |
| H A D | error_test.cpp | 175 Expected<int> A = 7; in TEST() 184 Expected<int &> B = A; in TEST() 195 EXPECT_DEATH({ Expected<int> A = 7; }, in TEST() 206 Expected<int> A = 7; in TEST() 219 Expected<int> A = 7; in TEST() 228 Expected<int> A = make_error<CustomError>(42); in TEST() 239 Expected<int> A = make_error<CustomError>(42); in TEST() 249 EXPECT_DEATH({ Expected<int> A = make_error<CustomError>(42); }, in TEST() 259 Expected<B *> A1(Expected<D *>(nullptr)); in TEST() 262 A1 = Expected<D *>(nullptr); in TEST() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Support/ |
| H A D | MSVCErrorWorkarounds.h | 43 template <typename T> class MSVCPExpected : public Expected<T> { 46 : Expected<T>(make_error<StringError>("", inconvertibleErrorCode())) { in MSVCPExpected() 50 MSVCPExpected(MSVCPExpected &&Other) : Expected<T>(std::move(Other)) {} in MSVCPExpected() 53 Expected<T>::operator=(std::move(Other)); 57 MSVCPExpected(Error Err) : Expected<T>(std::move(Err)) {} in MSVCPExpected() 63 : Expected<T>(std::move(Val)) {} 67 Expected<OtherT> &&Other, 69 : Expected<T>(std::move(Other)) {} 73 Expected<OtherT> &&Other, 75 : Expected<T>(std::move(Other)) {}
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Debuginfod/ |
| H A D | Debuginfod.h | 51 Expected<std::string> getDefaultDebuginfodCacheDirectory(); 59 Expected<std::string> getCachedOrDownloadSource(object::BuildIDRef ID, 64 Expected<std::string> getCachedOrDownloadExecutable(object::BuildIDRef ID); 68 Expected<std::string> getCachedOrDownloadDebuginfo(object::BuildIDRef ID); 72 Expected<std::string> getCachedOrDownloadArtifact(StringRef UniqueKey, 78 Expected<std::string> getCachedOrDownloadArtifact( 113 Expected<std::optional<std::string>> getDebugBinaryPath(object::BuildIDRef); 114 Expected<std::optional<std::string>> getBinaryPath(object::BuildIDRef); 118 Expected<bool> updateIfStale(); 133 Expected<std::string> findDebugBinaryPath(object::BuildIDRef); [all …]
|
| /openbsd-src/gnu/llvm/lldb/source/Plugins/Process/Linux/ |
| H A D | IntelPTSingleBufferTrace.cpp | 51 static Expected<uint32_t> ReadIntelPTConfigFile(const char *file, in ReadIntelPTConfigFile() 107 Expected<uint32_t> process_linux::GetIntelPTOSEventType() { in GetIntelPTOSEventType() 113 Expected<uint32_t> cap = in CheckPsbPeriod() 121 Expected<uint32_t> valid_values = ReadIntelPTConfigFile( in CheckPsbPeriod() 145 static Expected<uint64_t> 151 if (Expected<uint32_t> offset = ReadIntelPTConfigFile( in GeneratePerfEventConfigValue() 161 if (Expected<uint32_t> offset = ReadIntelPTConfigFile( in GeneratePerfEventConfigValue() 176 static Expected<perf_event_attr> 186 if (Expected<uint64_t> config_value = in CreateIntelPTPerfEventConfiguration() 192 if (Expected<uint32_t> intel_pt_type = GetIntelPTOSEventType()) in CreateIntelPTPerfEventConfiguration() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/DebugInfo/PDB/Native/ |
| H A D | PDBFile.h | 68 Expected<ArrayRef<uint8_t>> getBlockData(uint32_t BlockIndex, 87 Expected<std::unique_ptr<msf::MappedBlockStream>> 89 Expected<std::unique_ptr<msf::MappedBlockStream>> 98 Expected<InfoStream &> getPDBInfoStream(); 99 Expected<DbiStream &> getPDBDbiStream(); 100 Expected<GlobalsStream &> getPDBGlobalsStream(); 101 Expected<TpiStream &> getPDBTpiStream(); 102 Expected<TpiStream &> getPDBIpiStream(); 103 Expected<PublicsStream &> getPDBPublicsStream(); 104 Expected<SymbolStream &> getPDBSymbolStream(); [all …]
|
| /openbsd-src/gnu/llvm/lldb/source/Plugins/ScriptInterpreter/Python/ |
| H A D | PythonDataObjects.h | 315 llvm::Expected<PythonObject> CallMethod(const char *name, 327 llvm::Expected<PythonObject> Call(const T &... t) const { 336 llvm::Expected<PythonObject> GetAttribute(const llvm::Twine &name) const { 345 llvm::Expected<bool> IsTrue() { 354 llvm::Expected<long long> AsLongLong() const; 356 llvm::Expected<long long> AsUnsignedLongLong() const; 359 llvm::Expected<unsigned long long> AsModuloUnsignedLongLong() const; 361 llvm::Expected<bool> IsInstance(const PythonObject &cls) { 376 template <typename T> llvm::Expected<T> As(llvm::Expected<PythonObject> &&obj) { 385 template <> llvm::Expected<bool> As<bool>(llvm::Expected<PythonObject> &&obj); [all …]
|
| /openbsd-src/gnu/llvm/lldb/source/Plugins/Trace/intel-pt/ |
| H A D | TraceIntelPTBundleSaver.cpp | 70 static Expected<FileSpec> 97 static llvm::Expected<std::vector<JSONThread>> 137 static Expected<std::optional<FileSpec>> 156 Expected<std::vector<uint8_t>> compact_context_switch_trace = in WriteContextSwitchTrace() 177 static Expected<FileSpec> WriteIntelPTTrace(TraceIntelPT &trace_ipt, in WriteIntelPTTrace() 193 static llvm::Expected<std::optional<std::vector<JSONCpu>>> 206 Expected<std::optional<FileSpec>> context_switch_trace_path = in BuildCpusSection() 215 if (Expected<FileSpec> ipt_trace_path = in BuildCpusSection() 246 static llvm::Expected<std::vector<JSONModule>> 304 static llvm::Expected<JSONProcess> [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/BinaryFormat/ |
| H A D | MsgPackReader.h | 123 Expected<bool> read(Object &Obj); 136 template <class T> Expected<bool> readRaw(Object &Obj); 137 template <class T> Expected<bool> readInt(Object &Obj); 138 template <class T> Expected<bool> readUInt(Object &Obj); 139 template <class T> Expected<bool> readLength(Object &Obj); 140 template <class T> Expected<bool> readExt(Object &Obj); 141 Expected<bool> createRaw(Object &Obj, uint32_t Size); 142 Expected<bool> createExt(Object &Obj, uint32_t Size);
|
| /openbsd-src/gnu/llvm/clang/lib/Tooling/Transformer/ |
| H A D | RangeSelector.cpp | 54 static Expected<DynTypedNode> getNode(const ast_matchers::BoundNodes &Nodes, in getNode() 107 return [Selector](const MatchResult &Result) -> Expected<CharSourceRange> { in before() 108 Expected<CharSourceRange> SelectedRange = Selector(Result); in before() 116 return [Selector](const MatchResult &Result) -> Expected<CharSourceRange> { in after() 117 Expected<CharSourceRange> SelectedRange = Selector(Result); in after() 142 return [ID](const MatchResult &Result) -> Expected<CharSourceRange> { in node() 143 Expected<DynTypedNode> Node = getNode(Result.Nodes, ID); in node() 155 return [ID](const MatchResult &Result) -> Expected<CharSourceRange> { in statement() 156 Expected<DynTypedNode> Node = getNode(Result.Nodes, ID); in statement() 165 return [Begin, End](const MatchResult &Result) -> Expected<CharSourceRange> { in enclose() [all …]
|
| /openbsd-src/gnu/llvm/compiler-rt/lib/orc/ |
| H A D | error.h | 39 template <typename T> friend class Expected; variable 185 template <typename T> class ORC_RT_NODISCARD Expected { 187 template <class OtherT> friend class Expected; variable 202 Expected(Error Err) : HasError(true), Unchecked(true) { in Expected() function 209 Expected(OtherT &&Val, 216 Expected(Expected &&Other) { moveConstruct(std::move(Other)); } in Expected() function 221 Expected( 222 Expected<OtherT> &&Other, 230 explicit Expected( 231 Expected<OtherT> &&Other, [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/FileCheck/ |
| H A D | FileCheckImpl.h | 92 Expected<std::string> getWildcardRegex() const; 97 Expected<std::string> getMatchingString(ExpressionValue Value) const; 103 Expected<ExpressionValue> valueFromStringRepr(StringRef StrVal, 146 Expected<int64_t> getSignedValue() const; 150 Expected<uint64_t> getUnsignedValue() const; 159 Expected<ExpressionValue> operator+(const ExpressionValue &Lhs, 161 Expected<ExpressionValue> operator-(const ExpressionValue &Lhs, 163 Expected<ExpressionValue> operator*(const ExpressionValue &Lhs, 165 Expected<ExpressionValue> operator/(const ExpressionValue &Lhs, 167 Expected<ExpressionValue> max(const ExpressionValue &Lhs, [all …]
|