@@ -448,7 +448,7 @@ class ReflectionContext
448
448
auto StrTab = reinterpret_cast <const char *>(StrTabBuf.get ());
449
449
450
450
auto findELFSectionByName = [&](std::string Name)
451
- -> std::pair<std::pair< const char *, const char *>, uint64_t > {
451
+ -> std::pair<const char *, const char *> {
452
452
// Now for all the sections, find their name.
453
453
for (const typename T::Section *Hdr : SecHdrVec) {
454
454
uint32_t Offset = Hdr->sh_name ;
@@ -460,9 +460,9 @@ class ReflectionContext
460
460
auto SecSize = Hdr->sh_size ;
461
461
auto SecBuf = this ->getReader ().readBytes (SecStart, SecSize);
462
462
auto SecContents = reinterpret_cast <const char *>(SecBuf.get ());
463
- return {{ SecContents, SecContents + SecSize}, 0 };
463
+ return {SecContents, SecContents + SecSize};
464
464
}
465
- return {{ nullptr , nullptr }, 0 };
465
+ return {nullptr , nullptr };
466
466
};
467
467
468
468
auto FieldMdSec = findELFSectionByName (" swift5_fieldmd" );
@@ -474,28 +474,25 @@ class ReflectionContext
474
474
475
475
// We succeed if at least one of the sections is present in the
476
476
// ELF executable.
477
- if (FieldMdSec.first . first == nullptr &&
478
- AssocTySec.first . first == nullptr &&
479
- BuiltinTySec.first . first == nullptr &&
480
- CaptureSec.first . first == nullptr &&
481
- TypeRefMdSec.first . first == nullptr &&
482
- ReflStrMdSec.first . first == nullptr )
477
+ if (FieldMdSec.first == nullptr &&
478
+ AssocTySec.first == nullptr &&
479
+ BuiltinTySec.first == nullptr &&
480
+ CaptureSec.first == nullptr &&
481
+ TypeRefMdSec.first == nullptr &&
482
+ ReflStrMdSec.first == nullptr )
483
483
return false ;
484
484
485
485
auto LocalStartAddress = reinterpret_cast <uint64_t >(Buf.get ());
486
486
auto RemoteStartAddress =
487
487
static_cast <uint64_t >(ImageStart.getAddressData ());
488
488
489
489
ReflectionInfo info = {
490
- {{FieldMdSec.first .first , FieldMdSec.first .second }, FieldMdSec.second },
491
- {{AssocTySec.first .first , AssocTySec.first .second }, AssocTySec.second },
492
- {{BuiltinTySec.first .first , BuiltinTySec.first .second },
493
- BuiltinTySec.second },
494
- {{CaptureSec.first .first , CaptureSec.first .second }, CaptureSec.second },
495
- {{TypeRefMdSec.first .first , TypeRefMdSec.first .second },
496
- TypeRefMdSec.second },
497
- {{ReflStrMdSec.first .first , ReflStrMdSec.first .second },
498
- ReflStrMdSec.second },
490
+ {{FieldMdSec.first , FieldMdSec.second }, 0 },
491
+ {{AssocTySec.first , AssocTySec.second }, 0 },
492
+ {{BuiltinTySec.first , BuiltinTySec.second }, 0 },
493
+ {{CaptureSec.first , CaptureSec.second }, 0 },
494
+ {{TypeRefMdSec.first , TypeRefMdSec.second }, 0 },
495
+ {{ReflStrMdSec.first , ReflStrMdSec.second }, 0 },
499
496
LocalStartAddress,
500
497
RemoteStartAddress};
501
498
0 commit comments