CVSymbolVisitor.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- CVSymbolVisitor.h ----------------------------------------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H
  14. #define LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H
  15. #include "llvm/DebugInfo/CodeView/CVRecord.h"
  16. #include "llvm/Support/Error.h"
  17. namespace llvm {
  18. namespace codeview {
  19. class SymbolVisitorCallbacks;
  20. class CVSymbolVisitor {
  21. public:
  22. struct FilterOptions {
  23. std::optional<uint32_t> SymbolOffset;
  24. std::optional<uint32_t> ParentRecursiveDepth;
  25. std::optional<uint32_t> ChildRecursiveDepth;
  26. };
  27. CVSymbolVisitor(SymbolVisitorCallbacks &Callbacks);
  28. Error visitSymbolRecord(CVSymbol &Record);
  29. Error visitSymbolRecord(CVSymbol &Record, uint32_t Offset);
  30. Error visitSymbolStream(const CVSymbolArray &Symbols);
  31. Error visitSymbolStream(const CVSymbolArray &Symbols, uint32_t InitialOffset);
  32. Error visitSymbolStreamFiltered(const CVSymbolArray &Symbols,
  33. const FilterOptions &Filter);
  34. private:
  35. SymbolVisitorCallbacks &Callbacks;
  36. };
  37. } // end namespace codeview
  38. } // end namespace llvm
  39. #endif // LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H
  40. #ifdef __GNUC__
  41. #pragma GCC diagnostic pop
  42. #endif