summaryrefslogtreecommitdiff
path: root/include/llvm/DebugInfo/CodeView/CVRecord.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/DebugInfo/CodeView/CVRecord.h')
-rw-r--r--include/llvm/DebugInfo/CodeView/CVRecord.h5
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; }