[Alignment][NFC] Use Align with TargetLowering::setMinFunctionAlignment
[llvm-core.git] / include / llvm / DebugInfo / CodeView / DebugSymbolsSubsection.h
blob784fc59484b96e0117ce0654bbb1a0ac2d08b2f6
1 //===- DebugSymbolsSubsection.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_DEBUGSYMBOLSSUBSECTION_H
10 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLSSUBSECTION_H
12 #include "llvm/DebugInfo/CodeView/DebugSubsection.h"
13 #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
14 #include "llvm/Support/Error.h"
16 namespace llvm {
17 namespace codeview {
18 class DebugSymbolsSubsectionRef final : public DebugSubsectionRef {
19 public:
20 DebugSymbolsSubsectionRef()
21 : DebugSubsectionRef(DebugSubsectionKind::Symbols) {}
23 static bool classof(const DebugSubsectionRef *S) {
24 return S->kind() == DebugSubsectionKind::Symbols;
27 Error initialize(BinaryStreamReader Reader);
29 CVSymbolArray::Iterator begin() const { return Records.begin(); }
30 CVSymbolArray::Iterator end() const { return Records.end(); }
32 private:
33 CVSymbolArray Records;
36 class DebugSymbolsSubsection final : public DebugSubsection {
37 public:
38 DebugSymbolsSubsection() : DebugSubsection(DebugSubsectionKind::Symbols) {}
39 static bool classof(const DebugSubsection *S) {
40 return S->kind() == DebugSubsectionKind::Symbols;
43 uint32_t calculateSerializedSize() const override;
44 Error commit(BinaryStreamWriter &Writer) const override;
46 void addSymbol(CVSymbol Symbol);
48 private:
49 uint32_t Length = 0;
50 std::vector<CVSymbol> Records;
55 #endif