<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 22, 2016 at 10:34 AM Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">zturner added a comment.<br class="gmail_msg">
<br class="gmail_msg">
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.<br class="gmail_msg">
<br class="gmail_msg">
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.<br class="gmail_msg">
<br class="gmail_msg">
A side benefit is that this gives the arrays internal linkage, which should improve link times.  A static class member still has external linkage.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D24834" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D24834</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>