summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/CodeView/ModuleDebugFragment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/ModuleDebugFragment.cpp')
-rw-r--r--llvm/lib/DebugInfo/CodeView/ModuleDebugFragment.cpp36
1 files changed, 2 insertions, 34 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/ModuleDebugFragment.cpp b/llvm/lib/DebugInfo/CodeView/ModuleDebugFragment.cpp
index 1329f8cc8f6..a3327b06b98 100644
--- a/llvm/lib/DebugInfo/CodeView/ModuleDebugFragment.cpp
+++ b/llvm/lib/DebugInfo/CodeView/ModuleDebugFragment.cpp
@@ -1,5 +1,4 @@
-//===- ModuleDebugFragment.cpp --------------------------------------*- C++
-//-*-===//
+//===- ModuleDebugFragment.cpp -----------------------------------*- C++-*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -10,37 +9,6 @@
#include "llvm/DebugInfo/CodeView/ModuleDebugFragment.h"
-#include "llvm/Support/BinaryStreamReader.h"
-
-using namespace llvm;
using namespace llvm::codeview;
-ModuleDebugFragment::ModuleDebugFragment()
- : Kind(ModuleDebugFragmentKind::None) {}
-
-ModuleDebugFragment::ModuleDebugFragment(ModuleDebugFragmentKind Kind,
- BinaryStreamRef Data)
- : Kind(Kind), Data(Data) {}
-
-Error ModuleDebugFragment::initialize(BinaryStreamRef Stream,
- ModuleDebugFragment &Info) {
- const ModuleDebugFragmentHeader *Header;
- BinaryStreamReader Reader(Stream);
- if (auto EC = Reader.readObject(Header))
- return EC;
-
- ModuleDebugFragmentKind Kind =
- static_cast<ModuleDebugFragmentKind>(uint32_t(Header->Kind));
- if (auto EC = Reader.readStreamRef(Info.Data, Header->Length))
- return EC;
- Info.Kind = Kind;
- return Error::success();
-}
-
-uint32_t ModuleDebugFragment::getRecordLength() const {
- return sizeof(ModuleDebugFragmentHeader) + Data.getLength();
-}
-
-ModuleDebugFragmentKind ModuleDebugFragment::kind() const { return Kind; }
-
-BinaryStreamRef ModuleDebugFragment::getRecordData() const { return Data; }
+ModuleDebugFragment::~ModuleDebugFragment() {}
OpenPOWER on IntegriCloud