This is an archive of the discontinued LLVM Phabricator instance.

[LLD][ELF] - Use LLVM_ELF_IMPORT_TYPES_ELFT macro instead of multiple types definitions. NFCI.
ClosedPublic

Authored by grimar on Dec 28 2020, 2:22 AM.

Details

Summary

We can reduce the number of "using" declarations.
LLVM_ELF_IMPORT_TYPES_ELFT was extended in D93801.

Diff Detail

Event Timeline

grimar created this revision.Dec 28 2020, 2:22 AM
grimar requested review of this revision.Dec 28 2020, 2:22 AM
MaskRay accepted this revision.Dec 28 2020, 10:10 AM

LGTM.

This revision is now accepted and ready to land.Dec 28 2020, 10:10 AM

I had to revert the change in SharedFile::parse() before commit, because of warnings reported by GCC:

LLVM/llvm-project/llvm/include/llvm/Object/ELFTypes.h:136:50: warning: typedef ‘using Elf_Relr_Range = typename ELFT::RelrRange’ locally defined but not used [-Wunused-local-typedefs]
   using Elf_Relr_Range = typename ELFT::RelrRange;
Herald added a project: Restricted Project. · View Herald TranscriptDec 28 2020, 11:54 PM