diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-12-20 20:46:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-12-20 20:46:08 +0000 |
commit | bb3198949f0d2ab261e2ecaaf1f64ee3be37893b (patch) | |
tree | a030c04a07d2b4e74ae2bad5b1c8f3bf5853d2ef | |
parent | fb0fcacb9dab7121f6cf08cfd1d164319520e96c (diff) | |
download | bcm5719-llvm-bb3198949f0d2ab261e2ecaaf1f64ee3be37893b.tar.gz bcm5719-llvm-bb3198949f0d2ab261e2ecaaf1f64ee3be37893b.zip |
Use dyn_cast instead of dyn_cast_or_null.
There should be no null sections in InputSections.
llvm-svn: 321219
-rw-r--r-- | lld/ELF/MarkLive.cpp | 2 | ||||
-rw-r--r-- | lld/ELF/Target.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp index 3e56ae09ed5..88f558c7a3c 100644 --- a/lld/ELF/MarkLive.cpp +++ b/lld/ELF/MarkLive.cpp @@ -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); } diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index ddd408906d1..b528fd583c1 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -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; |