Abbreviation declarations are required to have non-null tags.
Treat a null tag as an error. llvm-svn: 356284
This commit is contained in:
parent
a70c9d49af
commit
98661d0221
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue