LLVM 19.0.0git
SymbolVisitorCallbacks.h
Go to the documentation of this file.
1//===- SymbolVisitorCallbacks.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_SYMBOLVISITORCALLBACKS_H
10#define LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H
11
13#include "llvm/Support/Error.h"
14
15namespace llvm {
16namespace codeview {
17
19 friend class CVSymbolVisitor;
20
21public:
22 virtual ~SymbolVisitorCallbacks() = default;
23
24 /// Action to take on unknown symbols. By default, they are ignored.
26 return Error::success();
27 }
28
29 /// Paired begin/end actions for all symbols. Receives all record data,
30 /// including the fixed-length record prefix. visitSymbolBegin() should
31 /// return the type of the Symbol, or an error if it cannot be determined.
33 return Error::success();
34 }
37
38#define SYMBOL_RECORD(EnumName, EnumVal, Name) \
39 virtual Error visitKnownRecord(CVSymbol &CVR, Name &Record) { \
40 return Error::success(); \
41 }
42#define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
43#include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
44};
45
46} // end namespace codeview
47} // end namespace llvm
48
49#endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
static ErrorSuccess success()
Create a success value.
Definition: Error.h:334
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Definition: CVRecord.h:29
virtual Error visitSymbolEnd(CVSymbol &Record)
virtual Error visitSymbolBegin(CVSymbol &Record)
virtual Error visitSymbolBegin(CVSymbol &Record, uint32_t Offset)
Paired begin/end actions for all symbols.
virtual Error visitUnknownSymbol(CVSymbol &Record)
Action to take on unknown symbols. By default, they are ignored.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:456