[PATCH] Select new undefined atom rather than old one if other conditions are the same.
Rui Ueyama
ruiu at google.com
Thu Nov 14 19:16:32 PST 2013
On Thu, Nov 14, 2013 at 7:06 PM, Nick Kledzik <kledzik at apple.com> wrote:
>
> On Nov 14, 2013, at 6:57 PM, Rui Ueyama <ruiu at google.com> wrote:
>
> On Thu, Nov 14, 2013 at 6:41 PM, kledzik at apple.com <kledzik at apple.com>wrote:
>
>>
>>
>> ================
>> Comment at: lib/Core/SymbolTable.cpp:192-194
>> @@ +191,5 @@
>> + const UndefinedAtom *newFallback = newUndef->fallback();
>> + bool hasDifferentFallback =
>> + (existingFallback && newFallback &&
>> + existingFallback->name() != newFallback->name());
>> + if (hasDifferentFallback) {
>> ----------------
>> hasDifferentFallback should also be true if one has a fallback and the
>> other does not.
>>
>
> If the existing atom does not have a fallback and new one has, it's normal
> -- no need to warn that. So the condition would be a bit complicated that.
>
> Ah! If one has a fallback and the other does not, you always silently
> choose the one with a fallback. The only time you need a warning is when
> both define fallbacks but they are different.
>
> LGTM.
>
Thanks! Committed in r194777.
> -Nick
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131114/e5af9142/attachment.html>
More information about the llvm-commits
mailing list