summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbutil/ExplainOutputStyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-pdbutil/ExplainOutputStyle.h')
-rw-r--r--llvm/tools/llvm-pdbutil/ExplainOutputStyle.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/llvm/tools/llvm-pdbutil/ExplainOutputStyle.h b/llvm/tools/llvm-pdbutil/ExplainOutputStyle.h
new file mode 100644
index 00000000000..386f6156a89
--- /dev/null
+++ b/llvm/tools/llvm-pdbutil/ExplainOutputStyle.h
@@ -0,0 +1,59 @@
+//===- ExplainOutputStyle.h ----------------------------------- *- C++ --*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TOOLS_LLVMPDBDUMP_EXPLAINOUTPUTSTYLE_H
+#define LLVM_TOOLS_LLVMPDBDUMP_EXPLAINOUTPUTSTYLE_H
+
+#include "LinePrinter.h"
+#include "OutputStyle.h"
+
+#include <string>
+
+namespace llvm {
+
+namespace pdb {
+
+class PDBFile;
+
+class ExplainOutputStyle : public OutputStyle {
+
+public:
+ ExplainOutputStyle(PDBFile &File, uint64_t FileOffset);
+
+ Error dump() override;
+
+private:
+ bool explainBlockStatus();
+
+ bool isFpm1() const;
+ bool isFpm2() const;
+
+ bool isSuperBlock() const;
+ bool isFpmBlock() const;
+ bool isBlockMapBlock() const;
+ bool isStreamDirectoryBlock() const;
+ Optional<uint32_t> getBlockStreamIndex() const;
+
+ void explainSuperBlockOffset();
+ void explainFpmBlockOffset();
+ void explainBlockMapOffset();
+ void explainStreamDirectoryOffset();
+ void explainStreamOffset(uint32_t Stream);
+ void explainUnknownBlock();
+
+ PDBFile &File;
+ const uint64_t FileOffset;
+ const uint64_t BlockIndex;
+ const uint64_t OffsetInBlock;
+ LinePrinter P;
+};
+} // namespace pdb
+} // namespace llvm
+
+#endif
OpenPOWER on IntegriCloud