[PATCH] D16009: [lld]Non-MachO references shouldn't assert when checking for TLV.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 17:47:25 PST 2016


Whatever.

On Fri, Jan 8, 2016, 5:20 PM Lang Hames <lhames at gmail.com> wrote:

> lhames accepted this revision.
> lhames added a comment.
> This revision is now accepted and ready to land.
>
> LGTM. Thanks Jim!
>
>
> ================
> Comment at: lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp:63
> @@ -62,2 +62,3 @@
>    bool isTLVAccess(const Reference &ref) const override {
> -    assert(ref.kindNamespace() == Reference::KindNamespace::mach_o);
> +    if (ref.kindNamespace() != Reference::KindNamespace::mach_o)
> +      return false;
> ----------------
> echristo wrote:
> > Can you add a comment explaining how you could get here? That said, is
> the check worth it now? i.e. do we really need the early exit?
> This is consistent with how GOT references (which are handled very
> similarly) are checked. We may try to improve on it in the future for
> performance reasons, but I'm happy with it for now.
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D16009
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160109/fc0255ee/attachment.html>


More information about the llvm-commits mailing list