<div dir="ltr">Sure. Done in r233456.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 27, 2015 at 5:06 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><p dir="ltr"><br>
On Mar 27, 2015 4:56 PM, "Rui Ueyama" <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<br>
><br>
> Author: ruiu<br>
> Date: Fri Mar 27 18:50:09 2015<br>
> New Revision: 233453<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=233453&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=233453&view=rev</a><br>
> Log:<br>
> Remove else after return.<br>
><br>
> Modified:<br>
> lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h<br>
><br>
> Modified: lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=233453&r1=233452&r2=233453&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=233453&r1=233452&r2=233453&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h (original)<br>
> +++ lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h Fri Mar 27 18:50:09 2015<br>
> @@ -633,17 +633,16 @@ DefaultLayout<ELFT>::addAtom(const Atom<br>
><br>
> _referencedDynAtoms.insert(reloc->target());<br>
> }<br>
> -<br>
> return section->appendAtom(atom);<br>
> - } else if (const AbsoluteAtom *absoluteAtom = dyn_cast<AbsoluteAtom>(atom)) {<br>
> + }<br>
> + if (const AbsoluteAtom *absoluteAtom = dyn_cast<AbsoluteAtom>(atom)) {<br>
> // Absolute atoms are not part of any section, they are global for the whole<br>
> // link<br>
> _absoluteAtoms.push_back(new (_allocator)<br>
> lld::AtomLayout(absoluteAtom, 0, absoluteAtom->value()));<br>
> return _absoluteAtoms.back();<br>
> - } else {<br>
> - llvm_unreachable("Only absolute / defined atoms can be added here");<br>
> }<br>
> + llvm_unreachable("Only absolute / defined atoms can be added here");</p>
</div></div><p dir="ltr">You could just switch the above dyn-cast to a cast instead? Rather than essentially branching to unreachable here.</p><div class="HOEnZb"><div class="h5">
<p dir="ltr">> }<br>
><br>
> /// Output sections with the same name into a OutputSection<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">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>
</p>
</div></div></blockquote></div><br></div>