File indexing completed on 2026-05-10 08:43:39
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLSSUBSECTION_H
0010 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLSSUBSECTION_H
0011
0012 #include "llvm/DebugInfo/CodeView/CVRecord.h"
0013 #include "llvm/DebugInfo/CodeView/DebugSubsection.h"
0014 #include "llvm/Support/Error.h"
0015
0016 namespace llvm {
0017 namespace codeview {
0018 class DebugSymbolsSubsectionRef final : public DebugSubsectionRef {
0019 public:
0020 DebugSymbolsSubsectionRef()
0021 : DebugSubsectionRef(DebugSubsectionKind::Symbols) {}
0022
0023 static bool classof(const DebugSubsectionRef *S) {
0024 return S->kind() == DebugSubsectionKind::Symbols;
0025 }
0026
0027 Error initialize(BinaryStreamReader Reader);
0028
0029 CVSymbolArray::Iterator begin() const { return Records.begin(); }
0030 CVSymbolArray::Iterator end() const { return Records.end(); }
0031
0032 private:
0033 CVSymbolArray Records;
0034 };
0035
0036 class DebugSymbolsSubsection final : public DebugSubsection {
0037 public:
0038 DebugSymbolsSubsection() : DebugSubsection(DebugSubsectionKind::Symbols) {}
0039 static bool classof(const DebugSubsection *S) {
0040 return S->kind() == DebugSubsectionKind::Symbols;
0041 }
0042
0043 uint32_t calculateSerializedSize() const override;
0044 Error commit(BinaryStreamWriter &Writer) const override;
0045
0046 void addSymbol(CVSymbol Symbol);
0047
0048 private:
0049 uint32_t Length = 0;
0050 std::vector<CVSymbol> Records;
0051 };
0052 }
0053 }
0054
0055 #endif