[Alignment][NFC] Use Align with TargetLowering::setMinFunctionAlignment
[llvm-core.git] / include / llvm / DebugInfo / CodeView / SymbolVisitorCallbacks.h
blob1a4d5b9d31df67daa6e49a71f9f11aabdadc5f7c
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H
10 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H
12 #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
13 #include "llvm/Support/Error.h"
15 namespace llvm {
16 namespace codeview {
18 class SymbolVisitorCallbacks {
19 friend class CVSymbolVisitor;
21 public:
22 virtual ~SymbolVisitorCallbacks() = default;
24 /// Action to take on unknown symbols. By default, they are ignored.
25 virtual Error visitUnknownSymbol(CVSymbol &Record) {
26 return Error::success();
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.
32 virtual Error visitSymbolBegin(CVSymbol &Record, uint32_t Offset) {
33 return Error::success();
35 virtual Error visitSymbolBegin(CVSymbol &Record) { return Error::success(); }
36 virtual Error visitSymbolEnd(CVSymbol &Record) { return Error::success(); }
38 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
39 virtual Error visitKnownRecord(CVSymbol &CVR, Name &Record) { \
40 return Error::success(); \
42 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
43 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
46 } // end namespace codeview
47 } // end namespace llvm
49 #endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORCALLBACKS_H