[LLVMdev] lld coding style

Johannes Doerfert doerfert at cs.uni-saarland.de
Sun Oct 5 13:24:31 PDT 2014


On 10/05, Roel Jordans wrote:
> >    than future commits should move lld's style
> >    towards that. Not by adding new styles to one line inside an old
> >    function, but by deprecating style when you deprecate code, and
> >    creating style when you create code.
> >
> >
> >That is one option. But the developers of LLD may be willing to more
> >aggressively convert. We should let them speak for themselves rather
> >than hypothesizing here.
> >
> 
> Polly did a bulk convert using clang-format if I remember correctly, that
> solved the coding style discrepancies in just a few commits.  They now run
> clang-format on any commit and that keeps things nice and tidy.  I'm not
> familiar with LLD though and its codebase could be much larger than that of
> polly at the time...
First, I don't know what to do with LLD but I like the way Polly is maintained
now.

If other projects want to go the same way we can provide the arcanist linter [1]
together with the clang format script [2]. This helps a lot keeping the tree
formated and minimizes the number of "[Format]" commits after something got
accidentally messed up. (We also run the format check on the buildbots to get
immediate feedback.)

[1] http://reviews.llvm.org/D4916
[2] https://github.com/llvm-mirror/polly/blob/master/utils/check_format.sh

-- 

Johannes Doerfert
Researcher / PhD Student

Compiler Design Lab (Prof. Hack)
Saarland University, Computer Science
Building E1.3, Room 4.26

Tel. +49 (0)681 302-57521 : doerfert at cs.uni-saarland.de
Fax. +49 (0)681 302-3065  : http://www.cdl.uni-saarland.de/people/doerfert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141005/14b10162/attachment.sig>


More information about the llvm-dev mailing list