Home | History | Annotate | Download | only in llvm-pdbutil
      1 //===- BytesOutputStyle.h ------------------------------------- *- C++ --*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 #ifndef LLVM_TOOLS_LLVMPDBDUMP_BYTESOUTPUTSTYLE_H
     11 #define LLVM_TOOLS_LLVMPDBDUMP_BYTESOUTPUTSTYLE_H
     12 
     13 #include "LinePrinter.h"
     14 #include "OutputStyle.h"
     15 #include "StreamUtil.h"
     16 
     17 #include "llvm/Support/Error.h"
     18 
     19 namespace llvm {
     20 
     21 namespace codeview {
     22 class LazyRandomTypeCollection;
     23 }
     24 
     25 namespace pdb {
     26 
     27 class PDBFile;
     28 
     29 class BytesOutputStyle : public OutputStyle {
     30 public:
     31   BytesOutputStyle(PDBFile &File);
     32 
     33   Error dump() override;
     34 
     35 private:
     36   void dumpNameMap();
     37   void dumpBlockRanges(uint32_t Min, uint32_t Max);
     38   void dumpByteRanges(uint32_t Min, uint32_t Max);
     39   void dumpFpm();
     40   void dumpStreamBytes();
     41 
     42   void dumpSectionContributions();
     43   void dumpSectionMap();
     44   void dumpModuleInfos();
     45   void dumpFileInfo();
     46   void dumpTypeServerMap();
     47   void dumpECData();
     48 
     49   void dumpModuleSyms();
     50   void dumpModuleC11();
     51   void dumpModuleC13();
     52 
     53   void dumpTypeIndex(uint32_t StreamIdx, ArrayRef<uint32_t> Indices);
     54 
     55   Expected<codeview::LazyRandomTypeCollection &>
     56   initializeTypes(uint32_t StreamIdx);
     57 
     58   std::unique_ptr<codeview::LazyRandomTypeCollection> TpiTypes;
     59   std::unique_ptr<codeview::LazyRandomTypeCollection> IpiTypes;
     60 
     61   PDBFile &File;
     62   LinePrinter P;
     63   ExitOnError Err;
     64   SmallVector<StreamInfo, 8> StreamPurposes;
     65 };
     66 } // namespace pdb
     67 } // namespace llvm
     68 
     69 #endif
     70