[llvm] r210613 - Sort includes.

Duncan P. N. Exon Smith dexonsmith at apple.com
Tue Jun 10 18:20:56 PDT 2014


> On 2014-Jun-10, at 18:05, Eric Christopher <echristo at gmail.com> wrote:
> 
> On Tue, Jun 10, 2014 at 6:01 PM, Duncan P. N. Exon Smith
> <dexonsmith at apple.com> wrote:
>> 
>>> On 2014-Jun-10, at 17:25, Eric Christopher <echristo at gmail.com> wrote:
>>> 
>>> Author: echristo
>>> Date: Tue Jun 10 19:25:16 2014
>>> New Revision: 210613
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=210613&view=rev
>>> Log:
>>> Sort includes.
>>> 
>>> Modified:
>>>   llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
>>> 
>>> Modified: llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp?rev=210613&r1=210612&r2=210613&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp (original)
>>> +++ llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp Tue Jun 10 19:25:16 2014
>>> @@ -11,7 +11,6 @@
>>> //
>>> //===----------------------------------------------------------------------===//
>>> 
>>> -#include "llvm/Target/TargetInstrInfo.h"
>> 
>> Shouldn't TargetInstrInfo.h be the first include of
>> TargetInstrInfo.cpp?
>> 
> 
> Uh, now that you mention it, good question. I thought we normally
> sorted them by directory, but now you have me second guessing.

Coding standards [1] put the main header first, *then* sorted --
first by type (local < llvm/... < system), then lexicographically.

I think a newline after the main header would make this less error
prone; not sure how others feel?

[1]: http://llvm.org/docs/CodingStandards.html#include-style



More information about the llvm-commits mailing list