[LLVMdev] lld coding style

Chris Lattner clattner at apple.com
Tue Oct 7 21:25:27 PDT 2014

On Oct 6, 2014, at 6:03 PM, Nick Kledzik <kledzik at apple.com> wrote:
>> I'd like to hear the reason. :)
> Up until now the thread has been about “formatting”.  You suggested renaming every variable in the project!

If that's what it takes. 

> On Oct 6, 2014, at 5:37 PM, Chris Lattner <clattner at apple.com> wrote:
>> Right.  Specifically, why is it for the “greater good” to perpetuate a schism between lld and the rest of llvm?
> Well to turn this around, why is llvm maintaining a schism with the rest of the C++ world?  That is, lld (and probably lldb) is more like all the other C++ conventions in the world than llvm is.  If llvm had conventions like every other convention, it would be easier for outside developers to contribute to llvm and improve the "greater good".

I can see where you're coming from, and as I hope you know, I deeply respect you and your work.  You're right that what we're talking about has a profound impact on 100% of the lld project.  That said, we must keep in perspective lld vs the rest of the llvm eco system.

By my count, lld is about 48K LOC (including include/lib/tools, but not tests).  When you compare this to LLVM (about ~1.1M LOC, or clang's ~900KLOC) what we're really discussing is whether it is better to favor the core preferences of the lld authors vs the opportunity cost of developers jumping from llvm/clang and being effective in the lld code base.  Given that we're talking about a 40x size difference, along with greater unity in the llvm community, this seems like a simple decision to me.

I see your point and can concede that not everyone in the C++ community follows the same approach as the LLVM coding standards, but a) the greater C++ community is far from unified on the lld style, and b) a random C++ developer is far less likely to make the leap to work on LLD than a random LLVM developer is.

I really think that both LLD and LLDB should move to the LLVM coding standards.  If it makes you feel better, doing so would be a bigger change for the LLDB folks than the LLD ones.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141007/0f2ad6dd/attachment.html>

More information about the llvm-dev mailing list