diff options
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp | 14 | ||||
| -rw-r--r-- | llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.h | 22 | ||||
| -rw-r--r-- | llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp | 14 | ||||
| -rw-r--r-- | llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp | 16 | ||||
| -rw-r--r-- | llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp | 13 | ||||
| -rw-r--r-- | llvm/tools/llvm-readobj/COFFDumper.cpp | 56 |
6 files changed, 67 insertions, 68 deletions
diff --git a/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp b/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp index b38b36532a7..78971eb5879 100644 --- a/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp +++ b/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp @@ -9,9 +9,9 @@ #include "C13DebugFragmentVisitor.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h" +#include "llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugLinesSubsection.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h" #include "llvm/DebugInfo/PDB/Native/PDBStringTable.h" #include "llvm/DebugInfo/PDB/Native/RawError.h" @@ -25,25 +25,25 @@ C13DebugFragmentVisitor::C13DebugFragmentVisitor(PDBFile &F) : F(F) {} C13DebugFragmentVisitor::~C13DebugFragmentVisitor() {} Error C13DebugFragmentVisitor::visitUnknown( - codeview::ModuleDebugUnknownFragmentRef &Fragment) { + codeview::DebugUnknownSubsectionRef &Fragment) { return Error::success(); } Error C13DebugFragmentVisitor::visitFileChecksums( - codeview::ModuleDebugFileChecksumFragmentRef &Checksums) { + codeview::DebugChecksumsSubsectionRef &Checksums) { assert(!this->Checksums.hasValue()); this->Checksums = Checksums; return Error::success(); } Error C13DebugFragmentVisitor::visitLines( - codeview::ModuleDebugLineFragmentRef &Lines) { + codeview::DebugLinesSubsectionRef &Lines) { this->Lines.push_back(Lines); return Error::success(); } Error C13DebugFragmentVisitor::visitInlineeLines( - codeview::ModuleDebugInlineeLineFragmentRef &Lines) { + codeview::DebugInlineeLinesSubsectionRef &Lines) { this->InlineeLines.push_back(Lines); return Error::success(); } diff --git a/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.h b/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.h index 1054b0c9f6e..a12f282c4c5 100644 --- a/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.h +++ b/llvm/tools/llvm-pdbdump/C13DebugFragmentVisitor.h @@ -11,8 +11,8 @@ #define LLVM_TOOLS_LLVMPDBDUMP_C13DEBUGFRAGMENTVISITOR_H #include "llvm/ADT/Optional.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugFragmentVisitor.h" +#include "llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h" #include "llvm/Support/Error.h" #include <vector> @@ -23,20 +23,20 @@ namespace pdb { class PDBFile; -class C13DebugFragmentVisitor : public codeview::ModuleDebugFragmentVisitor { +class C13DebugFragmentVisitor : public codeview::DebugSubsectionVisitor { public: C13DebugFragmentVisitor(PDBFile &F); ~C13DebugFragmentVisitor(); - Error visitUnknown(codeview::ModuleDebugUnknownFragmentRef &Fragment) final; + Error visitUnknown(codeview::DebugUnknownSubsectionRef &Fragment) final; - Error visitFileChecksums( - codeview::ModuleDebugFileChecksumFragmentRef &Checksums) final; + Error + visitFileChecksums(codeview::DebugChecksumsSubsectionRef &Checksums) final; - Error visitLines(codeview::ModuleDebugLineFragmentRef &Lines) final; + Error visitLines(codeview::DebugLinesSubsectionRef &Lines) final; Error - visitInlineeLines(codeview::ModuleDebugInlineeLineFragmentRef &Lines) final; + visitInlineeLines(codeview::DebugInlineeLinesSubsectionRef &Lines) final; Error finished() final; @@ -48,9 +48,9 @@ protected: Expected<StringRef> getNameFromStringTable(uint32_t Offset); Expected<StringRef> getNameFromChecksumsBuffer(uint32_t Offset); - Optional<codeview::ModuleDebugFileChecksumFragmentRef> Checksums; - std::vector<codeview::ModuleDebugInlineeLineFragmentRef> InlineeLines; - std::vector<codeview::ModuleDebugLineFragmentRef> Lines; + Optional<codeview::DebugChecksumsSubsectionRef> Checksums; + std::vector<codeview::DebugInlineeLinesSubsectionRef> InlineeLines; + std::vector<codeview::DebugLinesSubsectionRef> Lines; PDBFile &F; }; diff --git a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp index 07d3b226d7c..d95eca1aedd 100644 --- a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp +++ b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp @@ -15,14 +15,14 @@ #include "llvm-pdbdump.h" #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" +#include "llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugLinesSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h" +#include "llvm/DebugInfo/CodeView/DebugUnknownSubsection.h" #include "llvm/DebugInfo/CodeView/EnumTables.h" #include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h" #include "llvm/DebugInfo/CodeView/Line.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugFragmentVisitor.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugUnknownFragment.h" #include "llvm/DebugInfo/CodeView/SymbolDumper.h" #include "llvm/DebugInfo/CodeView/TypeDatabaseVisitor.h" #include "llvm/DebugInfo/CodeView/TypeDumpVisitor.h" @@ -830,8 +830,8 @@ Error LLVMOutputStyle::dumpDbiStream() { return ExpectedTypes.takeError(); auto &IpiItems = *ExpectedTypes; C13RawVisitor V(P, File, IpiItems); - if (auto EC = codeview::visitModuleDebugFragments( - ModS.linesAndChecksums(), V)) + if (auto EC = + codeview::visitDebugSubsections(ModS.linesAndChecksums(), V)) return EC; } } diff --git a/llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp b/llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp index 652182e8e9b..7aa68dee7d4 100644 --- a/llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp +++ b/llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp @@ -13,13 +13,13 @@ #include "PdbYaml.h" #include "llvm-pdbdump.h" +#include "llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugLinesSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h" +#include "llvm/DebugInfo/CodeView/DebugUnknownSubsection.h" #include "llvm/DebugInfo/CodeView/Line.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugFragmentVisitor.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugUnknownFragment.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/PDB/Native/DbiStream.h" #include "llvm/DebugInfo/PDB/Native/InfoStream.h" @@ -207,8 +207,8 @@ YAMLOutputStyle::getFileLineInfo(const pdb::ModuleDebugStreamRef &ModS) { yaml::PdbSourceFileInfo Info; C13YamlVisitor Visitor(Info, File); - if (auto EC = codeview::visitModuleDebugFragments(ModS.linesAndChecksums(), - Visitor)) + if (auto EC = + codeview::visitDebugSubsections(ModS.linesAndChecksums(), Visitor)) return std::move(EC); return Info; diff --git a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp index ff14c39cbaa..baba862ae66 100644 --- a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp +++ b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp @@ -31,10 +31,10 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Config/config.h" +#include "llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugLinesSubsection.h" #include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h" #include "llvm/DebugInfo/CodeView/TypeStreamMerger.h" #include "llvm/DebugInfo/CodeView/TypeTableBuilder.h" #include "llvm/DebugInfo/MSF/MSFBuilder.h" @@ -543,8 +543,7 @@ static void yamlToPdb(StringRef Path) { // File Checksums must be emitted before line information, because line // info records use offsets into the checksum buffer to reference a file's // source file name. - auto Checksums = - llvm::make_unique<ModuleDebugFileChecksumFragment>(Strings); + auto Checksums = llvm::make_unique<DebugChecksumsSubsection>(Strings); auto &ChecksumRef = *Checksums; if (!FLI.FileChecksums.empty()) { for (auto &FC : FLI.FileChecksums) @@ -554,7 +553,7 @@ static void yamlToPdb(StringRef Path) { for (const auto &Fragment : FLI.LineFragments) { auto Lines = - llvm::make_unique<ModuleDebugLineFragment>(ChecksumRef, Strings); + llvm::make_unique<DebugLinesSubsection>(ChecksumRef, Strings); Lines->setCodeSize(Fragment.CodeSize); Lines->setRelocationAddress(Fragment.RelocSegment, Fragment.RelocOffset); @@ -582,7 +581,7 @@ static void yamlToPdb(StringRef Path) { } for (const auto &Inlinee : FLI.Inlinees) { - auto Inlinees = llvm::make_unique<ModuleDebugInlineeLineFragment>( + auto Inlinees = llvm::make_unique<DebugInlineeLinesSubsection>( ChecksumRef, Inlinee.HasExtraFiles); for (const auto &Site : Inlinee.Sites) { Inlinees->addInlineSite(Site.Inlinee, Site.FileName, diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp index a59caa351e7..0ad479d3221 100644 --- a/llvm/tools/llvm-readobj/COFFDumper.cpp +++ b/llvm/tools/llvm-readobj/COFFDumper.cpp @@ -24,11 +24,11 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" #include "llvm/DebugInfo/CodeView/CodeView.h" +#include "llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h" +#include "llvm/DebugInfo/CodeView/DebugLinesSubsection.h" #include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h" #include "llvm/DebugInfo/CodeView/Line.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h" -#include "llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h" #include "llvm/DebugInfo/CodeView/RecordSerialization.h" #include "llvm/DebugInfo/CodeView/StringTable.h" #include "llvm/DebugInfo/CodeView/SymbolDeserializer.h" @@ -515,19 +515,19 @@ WeakExternalCharacteristics[] = { }; static const EnumEntry<uint32_t> SubSectionTypes[] = { - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, Symbols), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, Lines), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, StringTable), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, FileChecksums), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, FrameData), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, InlineeLines), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, CrossScopeImports), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, CrossScopeExports), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, ILLines), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, FuncMDTokenMap), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, TypeMDTokenMap), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, MergedAssemblyInput), - LLVM_READOBJ_ENUM_CLASS_ENT(ModuleDebugFragmentKind, CoffSymbolRVA), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, Symbols), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, Lines), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, StringTable), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, FileChecksums), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, FrameData), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, InlineeLines), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, CrossScopeImports), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, CrossScopeExports), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, ILLines), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, FuncMDTokenMap), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, TypeMDTokenMap), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, MergedAssemblyInput), + LLVM_READOBJ_ENUM_CLASS_ENT(DebugSubsectionKind, CoffSymbolRVA), }; static const EnumEntry<uint32_t> FrameDataFlags[] = { @@ -774,13 +774,13 @@ void COFFDumper::initializeFileAndStringTables(BinaryStreamReader &Reader) { StringRef Contents; error(Reader.readFixedString(Contents, SubSectionSize)); - switch (ModuleDebugFragmentKind(SubType)) { - case ModuleDebugFragmentKind::FileChecksums: { + switch (DebugSubsectionKind(SubType)) { + case DebugSubsectionKind::FileChecksums: { BinaryStreamReader CSR(Contents, support::little); error(CSR.readArray(CVFileChecksumTable, CSR.getLength())); break; } - case ModuleDebugFragmentKind::StringTable: { + case DebugSubsectionKind::StringTable: { BinaryStreamRef ST(Contents, support::little); error(CVStringTable.initialize(ST)); } break; @@ -847,20 +847,20 @@ void COFFDumper::printCodeViewSymbolSection(StringRef SectionName, printBinaryBlockWithRelocs("SubSectionContents", Section, SectionContents, Contents); - switch (ModuleDebugFragmentKind(SubType)) { - case ModuleDebugFragmentKind::Symbols: + switch (DebugSubsectionKind(SubType)) { + case DebugSubsectionKind::Symbols: printCodeViewSymbolsSubsection(Contents, Section, SectionContents); break; - case ModuleDebugFragmentKind::InlineeLines: + case DebugSubsectionKind::InlineeLines: printCodeViewInlineeLines(Contents); break; - case ModuleDebugFragmentKind::FileChecksums: + case DebugSubsectionKind::FileChecksums: printCodeViewFileChecksums(Contents); break; - case ModuleDebugFragmentKind::Lines: { + case DebugSubsectionKind::Lines: { // Holds a PC to file:line table. Some data to parse this subsection is // stored in the other subsections, so just check sanity and store the // pointers for deferred processing. @@ -886,7 +886,7 @@ void COFFDumper::printCodeViewSymbolSection(StringRef SectionName, FunctionNames.push_back(LinkageName); break; } - case ModuleDebugFragmentKind::FrameData: { + case DebugSubsectionKind::FrameData: { // First four bytes is a relocation against the function. BinaryStreamReader SR(Contents, llvm::support::little); const uint32_t *CodePtr; @@ -934,7 +934,7 @@ void COFFDumper::printCodeViewSymbolSection(StringRef SectionName, BinaryStreamReader Reader(FunctionLineTables[Name], support::little); - ModuleDebugLineFragmentRef LineInfo; + DebugLinesSubsectionRef LineInfo; error(LineInfo.initialize(Reader)); W.printHex("Flags", LineInfo.header()->Flags); @@ -997,7 +997,7 @@ void COFFDumper::printCodeViewSymbolsSubsection(StringRef Subsection, void COFFDumper::printCodeViewFileChecksums(StringRef Subsection) { BinaryStreamReader SR(Subsection, llvm::support::little); - ModuleDebugFileChecksumFragmentRef Checksums; + DebugChecksumsSubsectionRef Checksums; error(Checksums.initialize(SR)); for (auto &FC : Checksums) { @@ -1015,7 +1015,7 @@ void COFFDumper::printCodeViewFileChecksums(StringRef Subsection) { void COFFDumper::printCodeViewInlineeLines(StringRef Subsection) { BinaryStreamReader SR(Subsection, llvm::support::little); - ModuleDebugInlineeLineFragmentRef Lines; + DebugInlineeLinesSubsectionRef Lines; error(Lines.initialize(SR)); for (auto &Line : Lines) { |

