10b57cec5SDimitry Andric //===- CVSymbolVisitor.h ----------------------------------------*- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #ifndef LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H 100b57cec5SDimitry Andric #define LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H 110b57cec5SDimitry Andric 120b57cec5SDimitry Andric #include "llvm/DebugInfo/CodeView/CVRecord.h" 1381ad6265SDimitry Andric #include "llvm/Support/Error.h" 140b57cec5SDimitry Andric 150b57cec5SDimitry Andric namespace llvm { 160b57cec5SDimitry Andric namespace codeview { 170b57cec5SDimitry Andric class SymbolVisitorCallbacks; 180b57cec5SDimitry Andric 190b57cec5SDimitry Andric class CVSymbolVisitor { 200b57cec5SDimitry Andric public: 2181ad6265SDimitry Andric struct FilterOptions { 22*bdd1243dSDimitry Andric std::optional<uint32_t> SymbolOffset; 23*bdd1243dSDimitry Andric std::optional<uint32_t> ParentRecursiveDepth; 24*bdd1243dSDimitry Andric std::optional<uint32_t> ChildRecursiveDepth; 2581ad6265SDimitry Andric }; 2681ad6265SDimitry Andric 270b57cec5SDimitry Andric CVSymbolVisitor(SymbolVisitorCallbacks &Callbacks); 280b57cec5SDimitry Andric 290b57cec5SDimitry Andric Error visitSymbolRecord(CVSymbol &Record); 300b57cec5SDimitry Andric Error visitSymbolRecord(CVSymbol &Record, uint32_t Offset); 310b57cec5SDimitry Andric Error visitSymbolStream(const CVSymbolArray &Symbols); 320b57cec5SDimitry Andric Error visitSymbolStream(const CVSymbolArray &Symbols, uint32_t InitialOffset); 3381ad6265SDimitry Andric Error visitSymbolStreamFiltered(const CVSymbolArray &Symbols, 3481ad6265SDimitry Andric const FilterOptions &Filter); 350b57cec5SDimitry Andric 360b57cec5SDimitry Andric private: 370b57cec5SDimitry Andric SymbolVisitorCallbacks &Callbacks; 380b57cec5SDimitry Andric }; 390b57cec5SDimitry Andric 400b57cec5SDimitry Andric } // end namespace codeview 410b57cec5SDimitry Andric } // end namespace llvm 420b57cec5SDimitry Andric 430b57cec5SDimitry Andric #endif // LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H 44