[LLVMdev] Inconsistent third field in global_ctors (was Re: [llvm] r214321 - UseListOrder: Visit global values)

Reid Kleckner rnk at google.com
Thu Jul 31 10:07:29 PDT 2014


On Thu, Jul 31, 2014 at 9:49 AM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:
>
> Hold on, I'm still not sure what kind of guarantees (restrictions) the C
> API imposes.
>
> If I implement (2), then -verify will fail if someone (e.g.) adds
> `@llvm.global_ctors` with 2 fields.  Does C API stability preclude
> making that change?
>

Now you have reached the crux of it. Nobody really agrees. The verifier
doesn't reject the 2-field form yet, because I thought that would be a C
API break.


> Assuming it does, are there serious concerns with me implementing (1)
> instead?
>

That was my original intention: this would be an optional field
indefinitely, but it means globalopt, asan, and other consumers of
global_ctors have to dispatch on the size of the struct forever.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140731/c2e93fb0/attachment.html>


More information about the llvm-dev mailing list