Target.cpp contains code for all the targets that LLD supports. It was
simple and easy, but as the number of supported targets increased,
it got messy.
This patch splits the file into per-target files under ELF/arch directory.
Paths
| Differential D34222
Split Target.cpp into small files. ClosedPublic Authored by ruiu on Jun 14 2017, 2:33 PM.
Details Summary Target.cpp contains code for all the targets that LLD supports. It was This patch splits the file into per-target files under ELF/arch directory.
Diff Detail
Event TimelineHerald added subscribers: javed.absar, mgorny, nhaehnle and 3 others. · View Herald TranscriptJun 14 2017, 2:33 PM Comment Actions I like the idea here. My main concern is that I see several generic-looking functions in Target.h. Personally, I would kind of expect these functions to be in other locations, and Target.h only to include the interface that each of the different targets implements.
Comment Actions Thanks, I like this idea. We might want to do something similar for the tests.
Closed by commit rL305565: Split Target.cpp into small files. (authored by ruiu). · Explain WhyJun 16 2017, 10:33 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 102732 lld/ELF/Arch/AArch64.cpp
lld/ELF/Arch/AMDGPU.cpp
lld/ELF/Arch/ARM.cpp
lld/ELF/Arch/AVR.cpp
lld/ELF/Arch/Mips.cpp
lld/ELF/Arch/PPC.cpp
lld/ELF/Arch/PPC64.cpp
lld/ELF/Arch/X86.cpp
lld/ELF/Arch/X86_64.cpp
lld/ELF/CMakeLists.txt
lld/ELF/Target.h
lld/ELF/Target.cpp
|
Sorry for such a stupid little comment, but it really should be Arch to be consistent with most LLVM directory naming conventions.