LLVM  8.0.1
SymbolVisitorCallbacks.h
Go to the documentation of this file.
1 //===- SymbolVisitorCallbacks.h ---------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H
11 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H
12 
14 #include "llvm/Support/Error.h"
15 
16 namespace llvm {
17 namespace codeview {
18 
20  friend class CVSymbolVisitor;
21 
22 public:
23  virtual ~SymbolVisitorCallbacks() = default;
24 
25  /// Action to take on unknown symbols. By default, they are ignored.
27  return Error::success();
28  }
29 
30  /// Paired begin/end actions for all symbols. Receives all record data,
31  /// including the fixed-length record prefix. visitSymbolBegin() should
32  /// return the type of the Symbol, or an error if it cannot be determined.
34  return Error::success();
35  }
38 
39 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
40  virtual Error visitKnownRecord(CVSymbol &CVR, Name &Record) { \
41  return Error::success(); \
42  }
43 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
44 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
45 };
46 
47 } // end namespace codeview
48 } // end namespace llvm
49 
50 #endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
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:327
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158
virtual Error visitSymbolBegin(CVSymbol &Record)