[llvm] r173767 - Sorted includes using utils/sort_includes.

Chandler Carruth chandlerc at google.com
Mon Jan 28 22:16:06 PST 2013


On Mon, Jan 28, 2013 at 8:20 PM, Michael Gottesman <mgottesman at apple.com>wrote:

> Author: mgottesman
> Date: Mon Jan 28 22:20:52 2013
> New Revision: 173767
>
> URL: http://llvm.org/viewvc/llvm-project?rev=173767&view=rev
> Log:
> Sorted includes using utils/sort_includes.
>
> Modified:
>     llvm/trunk/lib/Transforms/ObjCARC/DependencyAnalysis.cpp
>     llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp
>     llvm/trunk/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp
>     llvm/trunk/lib/Transforms/ObjCARC/ObjCARCContract.cpp
>     llvm/trunk/lib/Transforms/ObjCARC/ObjCARCExpand.cpp
>     llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
>     llvm/trunk/lib/Transforms/ObjCARC/ObjCARCUtil.cpp
>     llvm/trunk/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp
>
> Modified: llvm/trunk/lib/Transforms/ObjCARC/DependencyAnalysis.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/DependencyAnalysis.cpp?rev=173767&r1=173766&r2=173767&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Transforms/ObjCARC/DependencyAnalysis.cpp (original)
> +++ llvm/trunk/lib/Transforms/ObjCARC/DependencyAnalysis.cpp Mon Jan 28
> 22:20:52 2013
> @@ -22,9 +22,8 @@
>
>  #define DEBUG_TYPE "objc-arc-dependency"
>  #include "ObjCARC.h"
> -#include "ProvenanceAnalysis.h"
>  #include "DependencyAnalysis.h"
> -
> +#include "ProvenanceAnalysis.h"
>  #include "llvm/Support/CFG.h"
>

Just FYI, the script assumes that for FooBar.cpp, the first #include is the
header which declares the interface defined by that source file.

So for this file, it would expect DependencyAnalysis.h to be the first
include, and for something like SROA.cpp, it expects Scalar.h (which
declares the one external function defined there) to be the first include.

You'll have to fix this manually, because based on this assumption, it ends
up sorting all but the first header.
-Chandler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130128/360f200a/attachment.html>


More information about the llvm-commits mailing list