File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1375,8 +1375,7 @@ static bool isDuplicateArmExidxSec(InputSection *Prev, InputSection *Cur) {
1375
1375
};
1376
1376
1377
1377
// Get the last table Entry from the previous .ARM.exidx section.
1378
- const ExidxEntry &PrevEntry = *reinterpret_cast <const ExidxEntry *>(
1379
- Prev->Data .data () + Prev->getSize () - sizeof (ExidxEntry));
1378
+ const ExidxEntry &PrevEntry = Prev->getDataAs <ExidxEntry>().back ();
1380
1379
if (IsExtabRef (PrevEntry.Unwind ))
1381
1380
return false ;
1382
1381
@@ -1388,10 +1387,7 @@ static bool isDuplicateArmExidxSec(InputSection *Prev, InputSection *Cur) {
1388
1387
// consecutive identical entries are rare and the effort to check that they
1389
1388
// are identical is high.
1390
1389
1391
- ArrayRef<const ExidxEntry> Entries (
1392
- reinterpret_cast <const ExidxEntry *>(Cur->Data .data ()),
1393
- Cur->getSize () / sizeof (ExidxEntry));
1394
- for (const ExidxEntry &Entry : Entries)
1390
+ for (const ExidxEntry Entry : Cur->getDataAs <ExidxEntry>())
1395
1391
if (IsExtabRef (Entry.Unwind ) || Entry.Unwind != PrevEntry.Unwind )
1396
1392
return false ;
1397
1393
// All table entries in this .ARM.exidx Section can be merged into the
You can’t perform that action at this time.
0 commit comments