[lld] r234582 - [ARM] Replace dyn_cast with isa check
David Blaikie
dblaikie at gmail.com
Fri Apr 10 08:12:02 PDT 2015
On Fri, Apr 10, 2015 at 3:30 AM, Denis Protivensky <
dprotivensky at accesssoftek.com> wrote:
> Author: denis-protivensky
> Date: Fri Apr 10 05:30:04 2015
> New Revision: 234582
>
> URL: http://llvm.org/viewvc/llvm-project?rev=234582&view=rev
> Log:
> [ARM] Replace dyn_cast with isa check
>
> Modified:
> lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp
>
> Modified: lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp?rev=234582&r1=234581&r2=234582&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp (original)
> +++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp Fri Apr 10
> 05:30:04 2015
> @@ -758,7 +758,7 @@ public:
> }
>
> std::error_code handleGOT(const Reference &ref) {
> - if (dyn_cast<const SharedLibraryAtom>(ref.target())) {
> + if (isa<const SharedLibraryAtom>(ref.target())) {
> llvm_unreachable("Handle shared GOT entries");
>
One step further: we generally avoid "branch to unreachable" in favor of an
assertion:
assert(!isa<SharedLibraryAtom>(ref.target()) && "Shared GOT entries aren't
handled yet");
> }
> return ARMRelocationPass::handleGOT(ref);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150410/32581817/attachment.html>
More information about the llvm-commits
mailing list