1 //===- DebugSubsection.h ------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H
11 #define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H
13 #include "llvm/DebugInfo/CodeView/CodeView.h"
14 #include "llvm/Support/BinaryStreamWriter.h"
15 #include "llvm/Support/Casting.h"
20 class DebugSubsectionRef {
22 explicit DebugSubsectionRef(DebugSubsectionKind Kind) : Kind(Kind) {}
23 virtual ~DebugSubsectionRef();
25 static bool classof(const DebugSubsectionRef *S) { return true; }
27 DebugSubsectionKind kind() const { return Kind; }
30 DebugSubsectionKind Kind;
33 class DebugSubsection {
35 explicit DebugSubsection(DebugSubsectionKind Kind) : Kind(Kind) {}
36 virtual ~DebugSubsection();
38 static bool classof(const DebugSubsection *S) { return true; }
40 DebugSubsectionKind kind() const { return Kind; }
42 virtual Error commit(BinaryStreamWriter &Writer) const = 0;
43 virtual uint32_t calculateSerializedSize() const = 0;
46 DebugSubsectionKind Kind;
49 } // namespace codeview
52 #endif // LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H