[PATCH] D24834: Convert option tables to use llvm::ArrayRefs

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 10:40:17 PDT 2016


If it makes it easier we could move all the option definition arrays to the
top of the file and put them one after the other.  Not sure if that would
help.

On Thu, Sep 22, 2016 at 10:34 AM Zachary Turner <zturner at google.com> wrote:

> zturner added a comment.
>
> Previously the option tables were declared as class statics and defined
> below the class.  And only a pointer was returned, so the compiler didn't
> have to know about the size of the array at compile time.
>
> In order for the compiler to know that the OptionDefinition[] is actually
> an OptionDefinition[7], or whatever (which is necessary in order to set the
> internal size member of the ArrayRef), the definition has to come before
> the class.
>
> A side benefit is that this gives the arrays internal linkage, which
> should improve link times.  A static class member still has external
> linkage.
>
>
> https://reviews.llvm.org/D24834
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160922/e4818307/attachment.html>


More information about the llvm-commits mailing list