xref: /freebsd/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/CVSymbolVisitor.h (revision d5b0e70f7e04d971691517ce1304d86a1e367e2e)
1 //===- CVSymbolVisitor.h ----------------------------------------*- 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 
9 #ifndef LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H
10 #define LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H
11 
12 #include "llvm/DebugInfo/CodeView/CVRecord.h"
13 #include "llvm/Support/ErrorOr.h"
14 
15 namespace llvm {
16 namespace codeview {
17 class SymbolVisitorCallbacks;
18 
19 class CVSymbolVisitor {
20 public:
21   CVSymbolVisitor(SymbolVisitorCallbacks &Callbacks);
22 
23   Error visitSymbolRecord(CVSymbol &Record);
24   Error visitSymbolRecord(CVSymbol &Record, uint32_t Offset);
25   Error visitSymbolStream(const CVSymbolArray &Symbols);
26   Error visitSymbolStream(const CVSymbolArray &Symbols, uint32_t InitialOffset);
27 
28 private:
29   SymbolVisitorCallbacks &Callbacks;
30 };
31 
32 } // end namespace codeview
33 } // end namespace llvm
34 
35 #endif // LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H
36