LLVM  10.0.0svn
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 
15 namespace llvm {
16 namespace codeview {
17 
19  friend class CVSymbolVisitor;
20 
21 public:
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
This class represents lattice values for constants.
Definition: AllocatorList.h:23
virtual Error visitUnknownSymbol(CVSymbol &Record)
Action to take on unknown symbols. By default, they are ignored.
virtual Error visitSymbolBegin(CVSymbol &Record, uint32_t Offset)
Paired begin/end actions for all symbols.
virtual Error visitSymbolEnd(CVSymbol &Record)
static ErrorSuccess success()
Create a success value.
Definition: Error.h:326
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Definition: CVRecord.h:30
virtual Error visitSymbolBegin(CVSymbol &Record)