[llvm] r210613 - Sort includes.

David Blaikie dblaikie at gmail.com
Tue Jun 10 19:03:46 PDT 2014


On Tue, Jun 10, 2014 at 6:20 PM, Duncan P. N. Exon Smith
<dexonsmith at apple.com> wrote:
>
>> 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?

Yep, I usually put a newline between each grouping (though I hadn't
realized we made a distinction between local and llvm/... headers) and
wouldn't mind that going in the coding standard.

>
> [1]: http://llvm.org/docs/CodingStandards.html#include-style
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list