9#ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKPIPELINE_H
10#define LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKPIPELINE_H
25 for (
auto *Visitor : Pipeline) {
26 if (
auto EC = Visitor->visitUnknownSymbol(
Record))
33 for (
auto *Visitor : Pipeline) {
41 for (
auto *Visitor : Pipeline) {
42 if (
auto EC = Visitor->visitSymbolBegin(
Record))
49 for (
auto *Visitor : Pipeline) {
50 if (
auto EC = Visitor->visitSymbolEnd(
Record))
57 Pipeline.push_back(&Callbacks);
60#define SYMBOL_RECORD(EnumName, EnumVal, Name) \
61 Error visitKnownRecord(CVSymbol &CVR, Name &Record) override { \
62 for (auto Visitor : Pipeline) { \
63 if (auto EC = Visitor->visitKnownRecord(CVR, Record)) \
66 return Error::success(); \
68#define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
69#include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
72 std::vector<SymbolVisitorCallbacks *> Pipeline;
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Error visitUnknownSymbol(CVSymbol &Record) override
Action to take on unknown symbols. By default, they are ignored.
Error visitSymbolBegin(CVSymbol &Record, uint32_t Offset) override
Paired begin/end actions for all symbols.
void addCallbackToPipeline(SymbolVisitorCallbacks &Callbacks)
Error visitSymbolBegin(CVSymbol &Record) override
SymbolVisitorCallbackPipeline()=default
Error visitSymbolEnd(CVSymbol &Record) override
This is an optimization pass for GlobalISel generic memory operations.