[PATCH] D33713: [ELF] - Do not crash when proccessing absolute symbols during GC.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed May 31 11:10:50 PDT 2017
George Rimar via Phabricator <reviews at reviews.llvm.org> writes:
> Index: ELF/MarkLive.cpp
> ===================================================================
> --- ELF/MarkLive.cpp
> +++ ELF/MarkLive.cpp
> @@ -220,7 +220,8 @@
>
> auto MarkSymbol = [&](const SymbolBody *Sym) {
> if (auto *D = dyn_cast_or_null<DefinedRegular>(Sym))
> - Enqueue({cast<InputSectionBase>(D->Section), D->Value});
> + if (auto *IS = dyn_cast_or_null<InputSectionBase>(D->Section))
> + Enqueue({IS, D->Value});
You can use cast_or_null instead of dyn_cast_or_null, no? LGTM with
that.
Cheers,
Rafeal
More information about the llvm-commits
mailing list