Abbreviation declarations are required to have non-null tags.

Treat a null tag as an error.

llvm-svn: 356284
This commit is contained in:
Zachary Turner 2019-03-15 18:00:43 +00:00
parent a70c9d49af
commit 98661d0221
1 changed files with 3 additions and 5 deletions

View File

@ -34,11 +34,9 @@ DWARFAbbreviationDeclaration::extract(const DWARFDataExtractor &data,
m_attributes.clear(); m_attributes.clear();
m_tag = data.GetULEB128(offset_ptr); m_tag = data.GetULEB128(offset_ptr);
if (m_tag == DW_TAG_null) { if (m_tag == DW_TAG_null)
// FIXME: According to the DWARF spec this may actually be malformed. return llvm::make_error<llvm::object::GenericBinaryError>(
// Should this return an error instead? "abbrev decl requires non-null tag.");
return DWARFEnumState::Complete;
}
m_has_children = data.GetU8(offset_ptr); m_has_children = data.GetU8(offset_ptr);