Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:40

0001 //===- SymbolVisitorCallbacks.h ---------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H
0010 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H
0011 
0012 #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
0013 #include "llvm/Support/Error.h"
0014 
0015 namespace llvm {
0016 namespace codeview {
0017 
0018 class SymbolVisitorCallbacks {
0019   friend class CVSymbolVisitor;
0020 
0021 public:
0022   virtual ~SymbolVisitorCallbacks() = default;
0023 
0024   /// Action to take on unknown symbols. By default, they are ignored.
0025   virtual Error visitUnknownSymbol(CVSymbol &Record) {
0026     return Error::success();
0027   }
0028 
0029   /// Paired begin/end actions for all symbols. Receives all record data,
0030   /// including the fixed-length record prefix.  visitSymbolBegin() should
0031   /// return the type of the Symbol, or an error if it cannot be determined.
0032   virtual Error visitSymbolBegin(CVSymbol &Record, uint32_t Offset) {
0033     return Error::success();
0034   }
0035   virtual Error visitSymbolBegin(CVSymbol &Record) { return Error::success(); }
0036   virtual Error visitSymbolEnd(CVSymbol &Record) { return Error::success(); }
0037 
0038 #define SYMBOL_RECORD(EnumName, EnumVal, Name)                                 \
0039   virtual Error visitKnownRecord(CVSymbol &CVR, Name &Record) {                \
0040     return Error::success();                                                   \
0041   }
0042 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
0043 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
0044 };
0045 
0046 } // end namespace codeview
0047 } // end namespace llvm
0048 
0049 #endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H