<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 10, 2015 at 3:30 AM, Denis Protivensky <span dir="ltr"><<a href="mailto:dprotivensky@accesssoftek.com" target="_blank">dprotivensky@accesssoftek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: denis-protivensky<br>
Date: Fri Apr 10 05:30:04 2015<br>
New Revision: 234582<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=234582&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=234582&view=rev</a><br>
Log:<br>
[ARM] Replace dyn_cast with isa check<br>
<br>
Modified:<br>
  lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp?rev=234582&r1=234581&r2=234582&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp?rev=234582&r1=234581&r2=234582&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp (original)<br>
+++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp Fri Apr 10 05:30:04 2015<br>
@@ -758,7 +758,7 @@ public:<br>
  }<br>
<br>
  std::error_code handleGOT(const Reference &ref) {<br>
-Â Â if (dyn_cast<const SharedLibraryAtom>(ref.target())) {<br>
+Â Â if (isa<const SharedLibraryAtom>(ref.target())) {<br>
    llvm_unreachable("Handle shared GOT entries");<br></blockquote><div><br>One step further: we generally avoid "branch to unreachable" in favor of an assertion:<br><br>assert(!isa<SharedLibraryAtom>(ref.target()) && "Shared GOT entries aren't handled yet");<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
   }<br>
   return ARMRelocationPass::handleGOT(ref);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>