PrettyVariableDumper.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //===- PrettyVariableDumper.h - PDBSymDumper variable dumper ----*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef LLVM_TOOLS_LLVMPDBDUMP_PRETTYVARIABLEDUMPER_H
  9. #define LLVM_TOOLS_LLVMPDBDUMP_PRETTYVARIABLEDUMPER_H
  10. #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
  11. namespace llvm {
  12. class StringRef;
  13. namespace pdb {
  14. class LinePrinter;
  15. class VariableDumper : public PDBSymDumper {
  16. public:
  17. VariableDumper(LinePrinter &P);
  18. void start(const PDBSymbolData &Var, uint32_t Offset = 0);
  19. void start(const PDBSymbolTypeVTable &Var, uint32_t Offset = 0);
  20. void startVbptr(uint32_t Offset, uint32_t Size);
  21. void dump(const PDBSymbolTypeArray &Symbol) override;
  22. void dump(const PDBSymbolTypeBuiltin &Symbol) override;
  23. void dump(const PDBSymbolTypeEnum &Symbol) override;
  24. void dump(const PDBSymbolTypeFunctionSig &Symbol) override;
  25. void dump(const PDBSymbolTypePointer &Symbol) override;
  26. void dump(const PDBSymbolTypeTypedef &Symbol) override;
  27. void dump(const PDBSymbolTypeUDT &Symbol) override;
  28. void dumpRight(const PDBSymbolTypeArray &Symbol) override;
  29. void dumpRight(const PDBSymbolTypeFunctionSig &Symbol) override;
  30. void dumpRight(const PDBSymbolTypePointer &Symbol) override;
  31. private:
  32. void dumpSymbolTypeAndName(const PDBSymbol &Type, StringRef Name);
  33. LinePrinter &Printer;
  34. };
  35. }
  36. }
  37. #endif