This is an archive of the discontinued LLVM Phabricator instance.

Fix the type of the Discared section
ClosedPublic

Authored by rafael on Dec 12 2017, 5:09 PM.

Details

Reviewers
ruiu
Summary

It is constructed with a kind of Regular and will dyn_cast to InputSection, but is declared to be an InputSectionBase.

Diff Detail

Event Timeline

rafael created this revision.Dec 12 2017, 5:09 PM
ruiu added inline comments.Dec 12 2017, 5:12 PM
ELF/InputSection.cpp
326

I wonder if you can avoid adding a new constructor by

InputSection InputSection::Discard(0, 0, 0, ArrayRef<uint8_t>(), "");

Use existing constructor.

ruiu accepted this revision.Dec 12 2017, 5:38 PM

LGTM

This revision is now accepted and ready to land.Dec 12 2017, 5:38 PM
espindola closed this revision.Mar 14 2018, 3:12 PM
espindola added a subscriber: espindola.

r320539