forked from OSchip/llvm-project
Use dyn_cast instead of dyn_cast_or_null.
There should be no null sections in InputSections. llvm-svn: 321219
This commit is contained in:
parent
fb0fcacb9d
commit
bb3198949f
|
@ -246,7 +246,7 @@ template <class ELFT> static void doGcSections() {
|
|||
// that point to .eh_frames. Otherwise, the garbage collector would drop
|
||||
// all of them. We also want to preserve personality routines and LSDA
|
||||
// referenced by .eh_frame sections, so we scan them for that here.
|
||||
if (auto *EH = dyn_cast_or_null<EhInputSection>(Sec)) {
|
||||
if (auto *EH = dyn_cast<EhInputSection>(Sec)) {
|
||||
EH->Live = true;
|
||||
scanEhFrameSection<ELFT>(*EH, Enqueue);
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ TargetInfo *elf::getTarget() {
|
|||
|
||||
template <class ELFT> static std::string getErrorLoc(const uint8_t *Loc) {
|
||||
for (InputSectionBase *D : InputSections) {
|
||||
auto *IS = dyn_cast_or_null<InputSection>(D);
|
||||
auto *IS = dyn_cast<InputSection>(D);
|
||||
if (!IS || !IS->getParent())
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue