diff options
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r-- | lld/ELF/InputFiles.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index d9df6abbf23..406db8e57eb 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -132,13 +132,13 @@ StringRef ObjectFile<ELFT>::getShtGroupSignature(const Elf_Shdr &Sec) { } template <class ELFT> -ArrayRef<typename ObjectFile<ELFT>::GroupEntryType> +ArrayRef<typename ObjectFile<ELFT>::uint32_X> ObjectFile<ELFT>::getShtGroupEntries(const Elf_Shdr &Sec) { const ELFFile<ELFT> &Obj = this->ELFObj; - ErrorOr<ArrayRef<GroupEntryType>> EntriesOrErr = - Obj.template getSectionContentsAsArray<GroupEntryType>(&Sec); + ErrorOr<ArrayRef<uint32_X>> EntriesOrErr = + Obj.template getSectionContentsAsArray<uint32_X>(&Sec); error(EntriesOrErr); - ArrayRef<GroupEntryType> Entries = *EntriesOrErr; + ArrayRef<uint32_X> Entries = *EntriesOrErr; if (Entries.empty() || Entries[0] != GRP_COMDAT) error("Unsupported SHT_GROUP format"); return Entries.slice(1); @@ -187,8 +187,7 @@ void ObjectFile<ELFT>::initializeSections(DenseSet<StringRef> &ComdatGroups) { Sections[I] = &InputSection<ELFT>::Discarded; if (ComdatGroups.insert(getShtGroupSignature(Sec)).second) continue; - for (GroupEntryType E : getShtGroupEntries(Sec)) { - uint32_t SecIndex = E; + for (uint32_t SecIndex : getShtGroupEntries(Sec)) { if (SecIndex >= Size) error("Invalid section index in group"); Sections[SecIndex] = &InputSection<ELFT>::Discarded; |