LLVM 22.0.0git
DebugSubsection.h
Go to the documentation of this file.
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
14#include "llvm/Support/Error.h"
15
16#include <cstdint>
17
18namespace llvm {
19class BinaryStreamWriter;
20namespace codeview {
21
23public:
24 explicit DebugSubsectionRef(DebugSubsectionKind Kind) : Kind(Kind) {}
26
27 static bool classof(const DebugSubsectionRef *S) { return true; }
28
29 DebugSubsectionKind kind() const { return Kind; }
30
31protected:
33};
34
36public:
37 explicit DebugSubsection(DebugSubsectionKind Kind) : Kind(Kind) {}
39
40 static bool classof(const DebugSubsection *S) { return true; }
41
42 DebugSubsectionKind kind() const { return Kind; }
43
44 virtual Error commit(BinaryStreamWriter &Writer) const = 0;
45 virtual uint32_t calculateSerializedSize() const = 0;
46
47protected:
49};
50
51} // namespace codeview
52} // namespace llvm
53
54#endif // LLVM_DEBUGINFO_CODEVIEW_DEBUGSUBSECTION_H
#define LLVM_ABI
Definition: Compiler.h:213
Provides write only access to a subclass of WritableBinaryStream.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:159
static bool classof(const DebugSubsectionRef *S)
DebugSubsectionKind kind() const
DebugSubsectionRef(DebugSubsectionKind Kind)
DebugSubsection(DebugSubsectionKind Kind)
DebugSubsectionKind kind() const
virtual uint32_t calculateSerializedSize() const =0
static bool classof(const DebugSubsection *S)
virtual Error commit(BinaryStreamWriter &Writer) const =0
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18