1 //===- DebugSymbolsSubsection.h --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLSSUBSECTION_H
11 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLSSUBSECTION_H
13 #include "llvm/DebugInfo/CodeView/DebugSubsection.h"
14 #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
15 #include "llvm/Support/Error.h"
19 class DebugSymbolsSubsectionRef final : public DebugSubsectionRef {
21 DebugSymbolsSubsectionRef()
22 : DebugSubsectionRef(DebugSubsectionKind::Symbols) {}
24 static bool classof(const DebugSubsectionRef *S) {
25 return S->kind() == DebugSubsectionKind::Symbols;
28 Error initialize(BinaryStreamReader Reader);
31 CVSymbolArray Records;
34 class DebugSymbolsSubsection final : public DebugSubsection {
36 DebugSymbolsSubsection() : DebugSubsection(DebugSubsectionKind::Symbols) {}
37 static bool classof(const DebugSubsection *S) {
38 return S->kind() == DebugSubsectionKind::Symbols;
41 uint32_t calculateSerializedSize() const override;
42 Error commit(BinaryStreamWriter &Writer) const override;
44 void addSymbol(CVSymbol Symbol);
48 std::vector<CVSymbol> Records;