[llvm-commits] [PATCH] Simplify the #include ordering rules of the coding standards

Dmitri Gribenko gribozavr at gmail.com
Fri Nov 30 08:06:37 PST 2012


On Fri, Nov 30, 2012 at 5:05 AM, Chandler Carruth <chandlerc at gmail.com> wrote:
> I've done a fair amount of moving headers around to fix layering issues, and I am continually frustrated by the fact that most of the #include sections of files in LLVM (and Clang to a lesser degree) do not actually follow the coding standards strictly. But honestly, that's because the coding standards are really hard to follow with a somewhat unexplained sequencing in the middle.
>
> This will become especially confusing when I begin moving headers from the top level tree in LLVM into an 'IR' subdirectory.
>
> I propose to simplify the rules: just lump all the 'llvm' headers that aren't treated specially into one group, and run your editor's 'sort' command over them.

I totally agree with this.  It does not make sense to have rules that
are hard to follow and don't buy us anything.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/




More information about the llvm-commits mailing list