forked from OSchip/llvm-project
Fix null dereference committed in r253277
llvm-svn: 253393
This commit is contained in:
parent
35c2eebfe4
commit
4689ef5943
|
@ -38,8 +38,9 @@ DWARFUnit::DWARFUnit(DWARFContext &DC, const DWARFSection &Section,
|
|||
const DWARFUnitIndex::Entry *IndexEntry)
|
||||
: Context(DC), InfoSection(Section), Abbrev(DA), RangeSection(RS),
|
||||
LineSection(LS), StringSection(SS), StringOffsetSection([&]() {
|
||||
if (const auto *C = IndexEntry->getOffset(DW_SECT_STR_OFFSETS))
|
||||
return SOS.slice(C->Offset, C->Offset + C->Length);
|
||||
if (IndexEntry)
|
||||
if (const auto *C = IndexEntry->getOffset(DW_SECT_STR_OFFSETS))
|
||||
return SOS.slice(C->Offset, C->Offset + C->Length);
|
||||
return SOS;
|
||||
}()),
|
||||
AddrOffsetSection(AOS), isLittleEndian(LE), UnitSection(UnitSection),
|
||||
|
|
Loading…
Reference in New Issue