1//===- DebugSubsection.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//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGSUBSECTION_H
10#define LLVM_DEBUGINFO_CODEVIEW_DEBUGSUBSECTION_H
11
12#include "llvm/DebugInfo/CodeView/CodeView.h"
13#include "llvm/Support/Error.h"
14
15#include <cstdint>
16
17namespace llvm {
18class BinaryStreamWriter;
19namespace codeview {
20
21class DebugSubsectionRef {
22public:
23 explicit DebugSubsectionRef(DebugSubsectionKind Kind) : Kind(Kind) {}
24 virtual ~DebugSubsectionRef();
25
26 static bool classof(const DebugSubsectionRef *S) { return true; }
27
28 DebugSubsectionKind kind() const { return Kind; }
29
30protected:
31 DebugSubsectionKind Kind;
32};
33
34class DebugSubsection {
35public:
36 explicit DebugSubsection(DebugSubsectionKind Kind) : Kind(Kind) {}
37 virtual ~DebugSubsection();
38
39 static bool classof(const DebugSubsection *S) { return true; }
40
41 DebugSubsectionKind kind() const { return Kind; }
42
43 virtual Error commit(BinaryStreamWriter &Writer) const = 0;
44 virtual uint32_t calculateSerializedSize() const = 0;
45
46protected:
47 DebugSubsectionKind Kind;
48};
49
50} // namespace codeview
51} // namespace llvm
52
53#endif // LLVM_DEBUGINFO_CODEVIEW_DEBUGSUBSECTION_H
54

source code of llvm/include/llvm/DebugInfo/CodeView/DebugSubsection.h