[lldb][NFC] Early exit in DWARFASTParserClang::ParseArrayType

This commit is contained in:
Raphael Isemann 2019-11-27 08:09:52 +01:00
parent e68b816178
commit 3a280422b6
1 changed files with 75 additions and 75 deletions

View File

@ -1257,8 +1257,10 @@ TypeSP DWARFASTParserClang::ParseArrayType(const DWARFDIE &die,
DWARFDIE type_die = attrs.type.Reference();
Type *element_type = dwarf->ResolveTypeUID(type_die, true);
if (element_type) {
auto array_info = ParseChildArrayInfo(die);
if (!element_type)
return nullptr;
llvm::Optional<SymbolFile::ArrayInfo> array_info = ParseChildArrayInfo(die);
if (array_info) {
attrs.byte_stride = array_info->byte_stride;
attrs.bit_stride = array_info->bit_stride;
@ -1332,8 +1334,6 @@ TypeSP DWARFASTParserClang::ParseArrayType(const DWARFDIE &die,
type_sp->SetEncodingType(element_type);
m_ast.SetMetadataAsUserID(clang_type.GetOpaqueQualType(), die.GetID());
return type_sp;
}
return nullptr;
}
TypeSP DWARFASTParserClang::ParsePointerToMemberType(