We maintain a few different branches of the lldb sources, e.g. to add swift support, and the xcode project files have diverged over time from llvm.org to our github repositories making git merging a real pain. The two biggest sources of pain are the BuildFiles and FileReferences sections of the project file, where we've managed to get the files in completely different orders across our different branches.
I threw together a quick script to sort the files in these sections, and to segregate the swift etc files that aren't on llvm.org into their own sections so they don't cause merge headaches as often.
If anyone is maintaining a fork/branch of lldb where they've added files to the xcode project file, this sorting will be need hand cleanup from them too. I suspect that everyone outside apple would be using cmake and ignoring the xcode project files -- but if this is a problem, please let me know and I'll delay.
Right now my cleanup script looks like this
cleanup-pbxproj.rb (4.43 KB)