diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-12-18 20:30:12 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-06 20:11:55 +0000 |
commit | 5f757f3ff9144b609b3c433dfd370cc6bdc191ad (patch) | |
tree | 1b4e980b866cd26a00af34c0a653eb640bd09caf /contrib/llvm-project/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp | |
parent | 3e1c8a35f741a5d114d0ba670b15191355711fe9 (diff) | |
parent | 312c0ed19cc5276a17bacf2120097bec4515b0f1 (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/contrib/llvm-project/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp b/contrib/llvm-project/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp index d72fe2683f92..1f6724988ae9 100644 --- a/contrib/llvm-project/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp +++ b/contrib/llvm-project/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp @@ -221,7 +221,7 @@ bool LVCodeViewReader::isSystemEntry(LVElement *Element, StringRef Name) const { return StringRef::npos != Name.find(String); }; auto Starts = [=](const char *Pattern) -> bool { - return Name.startswith(Pattern); + return Name.starts_with(Pattern); }; auto CheckExclude = [&]() -> bool { if (Starts("__") || Starts("_PMD") || Starts("_PMFN")) @@ -276,7 +276,7 @@ Error LVCodeViewReader::collectInlineeInfo( } Error LVCodeViewReader::traverseInlineeLines(StringRef Subsection) { - BinaryStreamReader SR(Subsection, llvm::support::little); + BinaryStreamReader SR(Subsection, llvm::endianness::little); DebugInlineeLinesSubsectionRef Lines; if (Error E = Lines.initialize(SR)) return createStringError(errorToErrorCode(std::move(E)), getFileName()); @@ -349,7 +349,7 @@ Error LVCodeViewReader::initializeFileAndStringTables( if (Error E = Reader.readFixedString(Contents, SubSectionSize)) return createStringError(errorToErrorCode(std::move(E)), getFileName()); - BinaryStreamRef ST(Contents, support::little); + BinaryStreamRef ST(Contents, llvm::endianness::little); switch (DebugSubsectionKind(SubType)) { case DebugSubsectionKind::FileChecksums: if (Error E = CVFileChecksumTable.initialize(ST)) @@ -478,8 +478,8 @@ Error LVCodeViewReader::loadPrecompiledObject(PrecompRecord &Precomp, if (Magic != COFF::DEBUG_SECTION_MAGIC) return errorCodeToError(object_error::parse_failed); - ReaderPrecomp = - std::make_unique<BinaryStreamReader>(*DataOrErr, support::little); + ReaderPrecomp = std::make_unique<BinaryStreamReader>( + *DataOrErr, llvm::endianness::little); cantFail( ReaderPrecomp->readArray(CVTypesPrecomp, ReaderPrecomp->getLength())); @@ -514,7 +514,7 @@ Error LVCodeViewReader::loadPrecompiledObject(PrecompRecord &Precomp, [&](TypeIndex TI, const CVType &Type) { TypeArray.push_back(Type); }); ItemStream = - std::make_unique<BinaryItemStream<CVType>>(llvm::support::little); + std::make_unique<BinaryItemStream<CVType>>(llvm::endianness::little); ItemStream->setItems(TypeArray); TypeStream.setUnderlyingStream(*ItemStream); @@ -550,7 +550,7 @@ Error LVCodeViewReader::traverseTypeSection(StringRef SectionName, // Get the first type record. It will indicate if this object uses a type // server (/Zi) or a PCH file (/Yu). CVTypeArray CVTypes; - BinaryStreamReader Reader(*DataOrErr, support::little); + BinaryStreamReader Reader(*DataOrErr, llvm::endianness::little); cantFail(Reader.readArray(CVTypes, Reader.getLength())); CVTypeArray::Iterator FirstType = CVTypes.begin(); @@ -621,7 +621,7 @@ Error LVCodeViewReader::traverseSymbolsSubsection(StringRef Subsection, LVSymbolVisitorDelegate VisitorDelegate(this, Section, &getObj(), SectionContents); CVSymbolArray Symbols; - BinaryStreamReader Reader(BinaryData, llvm::support::little); + BinaryStreamReader Reader(BinaryData, llvm::endianness::little); if (Error E = Reader.readArray(Symbols, Reader.getLength())) return createStringError(errorToErrorCode(std::move(E)), getFileName()); @@ -664,7 +664,7 @@ Error LVCodeViewReader::traverseSymbolSection(StringRef SectionName, if (Magic != COFF::DEBUG_SECTION_MAGIC) return createStringError(object_error::parse_failed, getFileName()); - BinaryStreamReader FSReader(Data, support::little); + BinaryStreamReader FSReader(Data, llvm::endianness::little); if (Error Err = initializeFileAndStringTables(FSReader)) return Err; @@ -752,7 +752,8 @@ Error LVCodeViewReader::traverseSymbolSection(StringRef SectionName, W.printString("Symbol Name", SymbolName); }); - BinaryStreamReader Reader(FunctionLineTables[SymbolName], support::little); + BinaryStreamReader Reader(FunctionLineTables[SymbolName], + llvm::endianness::little); DebugLinesSubsectionRef Lines; if (Error E = Lines.initialize(Reader)) |