[LLVMdev] Inconsistent third field in global_ctors (was Re: [llvm] r214321 - UseListOrder: Visit global values)
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu Jul 31 14:22:32 PDT 2014
> On 2014-Jul-31, at 11:22, Rafael Avila de Espindola <rafael.espindola at gmail.com> wrote:
>
> What we guarantee for the C API is really fuzzy. Given just the "don't break it" rule, adding any assert would be invalid.
>
> If you are really motivated, start a thread on llvm dev about it. IMHO, we need something on the lines of "don't break an existing user". What this would mean is that we *can* change it, but we have to have good reasons to think that no user will break because of it or we coordinate a transition, like what is going on with removal of the old jit (which *is* breaking the C API)
>
> In this particular case, what is the expected way of creating it with the C API? Manually construct the global? If so, it does look like we have to make the third field optional. If wanted, we could also create an c API specific for the constructors, tell people to use it instead and eventually remove support for the old format.
Yup, that's the problem. That upgrade path makes sense to me, so I
filed PR20506. I'll send a patch for option #1 (making the third field
truly option) in a moment.
More information about the llvm-dev
mailing list