File indexing completed on 2026-05-10 08:43:39
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGSUBSECTION_H
0010 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGSUBSECTION_H
0011
0012 #include "llvm/DebugInfo/CodeView/CodeView.h"
0013 #include "llvm/Support/Error.h"
0014
0015 #include <cstdint>
0016
0017 namespace llvm {
0018 class BinaryStreamWriter;
0019 namespace codeview {
0020
0021 class DebugSubsectionRef {
0022 public:
0023 explicit DebugSubsectionRef(DebugSubsectionKind Kind) : Kind(Kind) {}
0024 virtual ~DebugSubsectionRef();
0025
0026 static bool classof(const DebugSubsectionRef *S) { return true; }
0027
0028 DebugSubsectionKind kind() const { return Kind; }
0029
0030 protected:
0031 DebugSubsectionKind Kind;
0032 };
0033
0034 class DebugSubsection {
0035 public:
0036 explicit DebugSubsection(DebugSubsectionKind Kind) : Kind(Kind) {}
0037 virtual ~DebugSubsection();
0038
0039 static bool classof(const DebugSubsection *S) { return true; }
0040
0041 DebugSubsectionKind kind() const { return Kind; }
0042
0043 virtual Error commit(BinaryStreamWriter &Writer) const = 0;
0044 virtual uint32_t calculateSerializedSize() const = 0;
0045
0046 protected:
0047 DebugSubsectionKind Kind;
0048 };
0049
0050 }
0051 }
0052
0053 #endif