1 //===- DebugSubsection.h ------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H
10 #define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H
12 #include "llvm/DebugInfo/CodeView/CodeView.h"
13 #include "llvm/Support/BinaryStreamWriter.h"
14 #include "llvm/Support/Casting.h"
19 class DebugSubsectionRef
{
21 explicit DebugSubsectionRef(DebugSubsectionKind Kind
) : Kind(Kind
) {}
22 virtual ~DebugSubsectionRef();
24 static bool classof(const DebugSubsectionRef
*S
) { return true; }
26 DebugSubsectionKind
kind() const { return Kind
; }
29 DebugSubsectionKind Kind
;
32 class DebugSubsection
{
34 explicit DebugSubsection(DebugSubsectionKind Kind
) : Kind(Kind
) {}
35 virtual ~DebugSubsection();
37 static bool classof(const DebugSubsection
*S
) { return true; }
39 DebugSubsectionKind
kind() const { return Kind
; }
41 virtual Error
commit(BinaryStreamWriter
&Writer
) const = 0;
42 virtual uint32_t calculateSerializedSize() const = 0;
45 DebugSubsectionKind Kind
;
48 } // namespace codeview
51 #endif // LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H