diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-26 20:32:52 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-26 20:32:52 +0000 |
commit | 08bbd35a80bf7765fe0d3043f9eb5a2f2786b649 (patch) | |
tree | 80108f0f128657f8623f8f66ad9735b4d88e7b47 /include/llvm/DebugInfo/CodeView/CVRecord.h | |
parent | 7c7aba6e5fef47a01a136be655b0a92cfd7090f6 (diff) |
Diffstat (limited to 'include/llvm/DebugInfo/CodeView/CVRecord.h')
-rw-r--r-- | include/llvm/DebugInfo/CodeView/CVRecord.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/DebugInfo/CodeView/CVRecord.h b/include/llvm/DebugInfo/CodeView/CVRecord.h index 4c6bbedc6bbd..44040e04388a 100644 --- a/include/llvm/DebugInfo/CodeView/CVRecord.h +++ b/include/llvm/DebugInfo/CodeView/CVRecord.h @@ -27,9 +27,12 @@ namespace codeview { template <typename Kind> class CVRecord { public: - CVRecord() = default; + CVRecord() : Type(static_cast<Kind>(0)) {} + CVRecord(Kind K, ArrayRef<uint8_t> Data) : Type(K), RecordData(Data) {} + bool valid() const { return Type != static_cast<Kind>(0); } + uint32_t length() const { return RecordData.size(); } Kind kind() const { return Type; } ArrayRef<uint8_t> data() const { return RecordData; } |