summaryrefslogtreecommitdiff
path: root/include/llvm/DebugInfo/CodeView/ModuleDebugFragment.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:13 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:13 +0000
commita303c417bbdb53703c2c17398b08486bde78f1f6 (patch)
tree98366d6b93d863cefdc53f16c66c0c5ae7fb2261 /include/llvm/DebugInfo/CodeView/ModuleDebugFragment.h
parent12f3ca4cdb95b193af905a00e722a4dcb40b3de3 (diff)
Notes
Diffstat (limited to 'include/llvm/DebugInfo/CodeView/ModuleDebugFragment.h')
-rw-r--r--include/llvm/DebugInfo/CodeView/ModuleDebugFragment.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo/CodeView/ModuleDebugFragment.h b/include/llvm/DebugInfo/CodeView/ModuleDebugFragment.h
new file mode 100644
index 000000000000..a5311cae9480
--- /dev/null
+++ b/include/llvm/DebugInfo/CodeView/ModuleDebugFragment.h
@@ -0,0 +1,48 @@
+//===- ModuleDebugFragment.h ------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H
+#define LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H
+
+#include "llvm/DebugInfo/CodeView/CodeView.h"
+#include "llvm/Support/BinaryStreamWriter.h"
+#include "llvm/Support/Casting.h"
+
+namespace llvm {
+namespace codeview {
+
+class ModuleDebugFragmentRef {
+public:
+ explicit ModuleDebugFragmentRef(ModuleDebugFragmentKind Kind) : Kind(Kind) {}
+ virtual ~ModuleDebugFragmentRef();
+
+ ModuleDebugFragmentKind kind() const { return Kind; }
+
+protected:
+ ModuleDebugFragmentKind Kind;
+};
+
+class ModuleDebugFragment {
+public:
+ explicit ModuleDebugFragment(ModuleDebugFragmentKind Kind) : Kind(Kind) {}
+ virtual ~ModuleDebugFragment();
+
+ ModuleDebugFragmentKind kind() const { return Kind; }
+
+ virtual Error commit(BinaryStreamWriter &Writer) = 0;
+ virtual uint32_t calculateSerializedLength() = 0;
+
+protected:
+ ModuleDebugFragmentKind Kind;
+};
+
+} // namespace codeview
+} // namespace llvm
+
+#endif // LLVM_DEBUGINFO_CODEVIEW_MODULEDEBUGFRAGMENT_H