[lld] r321219 - Use dyn_cast instead of dyn_cast_or_null.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 20 12:46:08 PST 2017
Author: rafael
Date: Wed Dec 20 12:46:08 2017
New Revision: 321219
URL: http://llvm.org/viewvc/llvm-project?rev=321219&view=rev
Log:
Use dyn_cast instead of dyn_cast_or_null.
There should be no null sections in InputSections.
Modified:
lld/trunk/ELF/MarkLive.cpp
lld/trunk/ELF/Target.cpp
Modified: lld/trunk/ELF/MarkLive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MarkLive.cpp?rev=321219&r1=321218&r2=321219&view=diff
==============================================================================
--- lld/trunk/ELF/MarkLive.cpp (original)
+++ lld/trunk/ELF/MarkLive.cpp Wed Dec 20 12:46:08 2017
@@ -246,7 +246,7 @@ template <class ELFT> static void doGcSe
// 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);
}
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=321219&r1=321218&r2=321219&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Wed Dec 20 12:46:08 2017
@@ -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;
More information about the llvm-commits
mailing list