mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Make sure that if we're going to attempt to add a type to a DIE that
the type exists. Fix up cases where we weren't checking for optional types and add an assert to addType to make sure we catch this in the future. Fix up a testcase that was using the tag for DW_TAG_array_type when it meant DW_TAG_enumeration_type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187963 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -483,6 +483,12 @@ bool DICompositeType::Verify() const {
|
||||
if (!fieldIsMDNode(DbgNode, 12))
|
||||
return false;
|
||||
|
||||
// If this is an array type verify that we have a DIType in the derived type
|
||||
// field as that's the type of our element.
|
||||
if (getTag() == dwarf::DW_TAG_array_type)
|
||||
if (!DIType(getTypeDerivedFrom()))
|
||||
return false;
|
||||
|
||||
return DbgNode->getNumOperands() >= 10 && DbgNode->getNumOperands() <= 14;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user