summaryrefslogtreecommitdiff
path: root/tools/llvm-pdbdump
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-pdbdump')
-rw-r--r--tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp14
-rw-r--r--tools/llvm-pdbdump/C13DebugFragmentVisitor.h22
-rw-r--r--tools/llvm-pdbdump/LLVMOutputStyle.cpp14
-rw-r--r--tools/llvm-pdbdump/YAMLOutputStyle.cpp16
-rw-r--r--tools/llvm-pdbdump/llvm-pdbdump.cpp13
5 files changed, 39 insertions, 40 deletions
diff --git a/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp b/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp
index b38b36532a719..78971eb5879a7 100644
--- a/tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp
+++ b/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/tools/llvm-pdbdump/C13DebugFragmentVisitor.h b/tools/llvm-pdbdump/C13DebugFragmentVisitor.h
index 1054b0c9f6e0a..a12f282c4c5ca 100644
--- a/tools/llvm-pdbdump/C13DebugFragmentVisitor.h
+++ b/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/tools/llvm-pdbdump/LLVMOutputStyle.cpp b/tools/llvm-pdbdump/LLVMOutputStyle.cpp
index 07d3b226d7c6a..d95eca1aeddb1 100644
--- a/tools/llvm-pdbdump/LLVMOutputStyle.cpp
+++ b/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/tools/llvm-pdbdump/YAMLOutputStyle.cpp b/tools/llvm-pdbdump/YAMLOutputStyle.cpp
index 652182e8e9b3d..7aa68dee7d474 100644
--- a/tools/llvm-pdbdump/YAMLOutputStyle.cpp
+++ b/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/tools/llvm-pdbdump/llvm-pdbdump.cpp b/tools/llvm-pdbdump/llvm-pdbdump.cpp
index ff14c39cbaab3..baba862ae663f 100644
--- a/tools/llvm-pdbdump/llvm-pdbdump.cpp
+++ b/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,