PDBSymDumper.cpp 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. //===- PDBSymDumper.cpp - ---------------------------------------*- 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. #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
  9. #include "llvm/Support/ErrorHandling.h"
  10. using namespace llvm;
  11. using namespace llvm::pdb;
  12. #define PDB_SYMDUMP_UNREACHABLE(Type) \
  13. if (RequireImpl) \
  14. llvm_unreachable("Attempt to dump " #Type " with no dump implementation");
  15. PDBSymDumper::PDBSymDumper(bool ShouldRequireImpl)
  16. : RequireImpl(ShouldRequireImpl) {}
  17. PDBSymDumper::~PDBSymDumper() = default;
  18. void PDBSymDumper::dump(const PDBSymbolAnnotation &Symbol) {
  19. PDB_SYMDUMP_UNREACHABLE(PDBSymbolAnnotation)
  20. }
  21. void PDBSymDumper::dump(const PDBSymbolBlock &Symbol) {
  22. PDB_SYMDUMP_UNREACHABLE(PDBSymbolBlock)
  23. }
  24. void PDBSymDumper::dump(const PDBSymbolCompiland &Symbol) {
  25. PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompiland)
  26. }
  27. void PDBSymDumper::dump(const PDBSymbolCompilandDetails &Symbol) {
  28. PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompilandDetails)
  29. }
  30. void PDBSymDumper::dump(const PDBSymbolCompilandEnv &Symbol) {
  31. PDB_SYMDUMP_UNREACHABLE(PDBSymbolCompilandEnv)
  32. }
  33. void PDBSymDumper::dump(const PDBSymbolCustom &Symbol) {
  34. PDB_SYMDUMP_UNREACHABLE(PDBSymbolCustom)
  35. }
  36. void PDBSymDumper::dump(const PDBSymbolData &Symbol) {
  37. PDB_SYMDUMP_UNREACHABLE(PDBSymbolData)
  38. }
  39. void PDBSymDumper::dump(const PDBSymbolExe &Symbol) {
  40. PDB_SYMDUMP_UNREACHABLE(PDBSymbolExe)
  41. }
  42. void PDBSymDumper::dump(const PDBSymbolFunc &Symbol) {
  43. PDB_SYMDUMP_UNREACHABLE(PDBSymbolFunc)
  44. }
  45. void PDBSymDumper::dump(const PDBSymbolFuncDebugEnd &Symbol) {
  46. PDB_SYMDUMP_UNREACHABLE(PDBSymbolFuncDebugEnd)
  47. }
  48. void PDBSymDumper::dump(const PDBSymbolFuncDebugStart &Symbol) {
  49. PDB_SYMDUMP_UNREACHABLE(PDBSymbolFuncDebugStart)
  50. }
  51. void PDBSymDumper::dump(const PDBSymbolLabel &Symbol) {
  52. PDB_SYMDUMP_UNREACHABLE(PDBSymbolLabel)
  53. }
  54. void PDBSymDumper::dump(const PDBSymbolPublicSymbol &Symbol) {
  55. PDB_SYMDUMP_UNREACHABLE(PDBSymbolPublicSymbol)
  56. }
  57. void PDBSymDumper::dump(const PDBSymbolThunk &Symbol) {
  58. PDB_SYMDUMP_UNREACHABLE(PDBSymbolThunk)
  59. }
  60. void PDBSymDumper::dump(const PDBSymbolTypeArray &Symbol) {
  61. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeArray)
  62. }
  63. void PDBSymDumper::dump(const PDBSymbolTypeBaseClass &Symbol) {
  64. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeBaseClass)
  65. }
  66. void PDBSymDumper::dump(const PDBSymbolTypeBuiltin &Symbol) {
  67. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeBuiltin)
  68. }
  69. void PDBSymDumper::dump(const PDBSymbolTypeCustom &Symbol) {
  70. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeCustom)
  71. }
  72. void PDBSymDumper::dump(const PDBSymbolTypeDimension &Symbol) {
  73. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeDimension)
  74. }
  75. void PDBSymDumper::dump(const PDBSymbolTypeEnum &Symbol) {
  76. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeEnum)
  77. }
  78. void PDBSymDumper::dump(const PDBSymbolTypeFriend &Symbol) {
  79. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFriend)
  80. }
  81. void PDBSymDumper::dump(const PDBSymbolTypeFunctionArg &Symbol) {
  82. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFunctionArg)
  83. }
  84. void PDBSymDumper::dump(const PDBSymbolTypeFunctionSig &Symbol) {
  85. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeFunctionSig)
  86. }
  87. void PDBSymDumper::dump(const PDBSymbolTypeManaged &Symbol) {
  88. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeManaged)
  89. }
  90. void PDBSymDumper::dump(const PDBSymbolTypePointer &Symbol) {
  91. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypePointer)
  92. }
  93. void PDBSymDumper::dump(const PDBSymbolTypeTypedef &Symbol) {
  94. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeTypedef)
  95. }
  96. void PDBSymDumper::dump(const PDBSymbolTypeUDT &Symbol) {
  97. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeUDT)
  98. }
  99. void PDBSymDumper::dump(const PDBSymbolTypeVTable &Symbol) {
  100. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeVTable)
  101. }
  102. void PDBSymDumper::dump(const PDBSymbolTypeVTableShape &Symbol) {
  103. PDB_SYMDUMP_UNREACHABLE(PDBSymbolTypeVTableShape)
  104. }
  105. void PDBSymDumper::dump(const PDBSymbolUnknown &Symbol) {
  106. PDB_SYMDUMP_UNREACHABLE(PDBSymbolUnknown)
  107. }
  108. void PDBSymDumper::dump(const PDBSymbolUsingNamespace &Symbol) {
  109. PDB_SYMDUMP_UNREACHABLE(PDBSymbolUsingNamespace)
  110. }