forked from OSchip/llvm-project
[ELF] ICF: change a dyn_cast<InputSection> to cast
ICF is performed after EhInputSections and MergeInputSections were eliminated from inputSections. Every element of inputSections is an InputSection. llvm-svn: 371744
This commit is contained in:
parent
a6e944b173
commit
2ad25a4aee
|
|
@ -446,10 +446,11 @@ static void print(const Twine &s) {
|
|||
// The main function of ICF.
|
||||
template <class ELFT> void ICF<ELFT>::run() {
|
||||
// Collect sections to merge.
|
||||
for (InputSectionBase *sec : inputSections)
|
||||
if (auto *s = dyn_cast<InputSection>(sec))
|
||||
for (InputSectionBase *sec : inputSections) {
|
||||
auto *s = cast<InputSection>(sec);
|
||||
if (isEligible(s))
|
||||
sections.push_back(s);
|
||||
}
|
||||
|
||||
// Initially, we use hash values to partition sections.
|
||||
parallelForEach(sections, [&](InputSection *s) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue