mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-03 18:37:56 +00:00
Fix null dereference committed in r253277
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253393 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6715b1eee1
commit
2fa6f196d6
@ -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…
x
Reference in New Issue
Block a user