[llvm] r192803 - Assert on duplicate registration. Don't depend on function pointer equality.

Rafael Espíndola rafael.espindola at gmail.com
Wed Oct 16 13:25:32 PDT 2013


Should be fixed in r192835.

On 16 October 2013 16:17, Sean Callanan <scallanan at apple.com> wrote:
> Rafael,
>
> thanks for your quick response.
> Yes, that looks fine to me.  I don’t see value in having an “if” there.
>
> Sean
>
> On Oct 16, 2013, at 1:16 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
>
>> On 16 October 2013 16:06, Sean Callanan <scallanan at apple.com> wrote:
>>> Rafael,
>>>
>>> how do you reconcile this patch with the text on IntiializeAllTargetMCs()
>>> (llvm/Support/TargetSelect.h) that says specifically:
>>>
>>>  /// It is legal for a client to make multiple calls to this function.
>>>
>>> LLDB in particular uses this because various of its subsystems depend on the
>>> TargetMCs being initialized and whoever gets to it first makes sure they
>>> are.  We try to avoid static constructors.
>>>
>>> I’d argue for reverting your patch as it breaks a declared interface
>>> contract.
>>
>> OK, so this and our use of -fvisibility-inlines-hidden basically mean
>> that we cannot make any meaningful checks about the initialization. It
>> is probably best to just drop the asserts.
>>
>> Is the attached patch OK for you?
>>
>> Cheers,
>> Rafael
>> <t.patch>
>




More information about the llvm-commits mailing list