summaryrefslogtreecommitdiffstats
path: root/llvm/utils/sort_includes.py
Commit message (Collapse)AuthorAgeFilesLines
* Add polly support to sort_includes.pyTobias Grosser2015-05-091-7/+13
| | | | | | | | | | | | | | | Changes: - Add "isl/" as a system library prefix. Even though isl is regularly imported into polly, it is still used like an external library. - Add "json/" as a system library prefix. Polly uses json-cpp as external library. - Distinguish between llvm and subproject libraries. Always sort subprojects before LLVM. This was already the case with clang, as 'clang' comes before 'llvm', but we also want 'polly' to be sorted before 'llvm'. The sorting of headers that are not part of Polly or isl remains unchanged. llvm-svn: 236929
* Teach sort_includes.py to drop duplicated includes.Benjamin Kramer2012-12-211-3/+3
| | | | llvm-svn: 170911
* Teach the include sorter to quickly skip files with an extension thatChandler Carruth2012-12-041-1/+5
| | | | | | | | doesn't look like it will have C++ code in it. Suggestions on a better heuristic are welcome. llvm-svn: 169248
* Teach the include sorter to skip files under test trees and under INPUTSChandler Carruth2012-12-041-0/+5
| | | | | | | trees. This allows running the input sorter on the entire clang repository cleanly now. llvm-svn: 169247
* Teach the include sorting script about the gtest headers; sort them withChandler Carruth2012-12-041-1/+1
| | | | | | the system headers. llvm-svn: 169242
* Address review comments from Matt on the sort_includes.py script.Chandler Carruth2012-12-041-10/+9
| | | | | | | | | | | | | | | 1) Teach it to handle files with #include on the first line -- these do actually exist in LLVM. 2) Support llvm-c and clang-c include projects. 3) Nuke some stail imports. 4) Switch to using os.path to split the file extension off. 5) Remove debugging leftovers. 6) Add docstring (a really puny one) for the sort function. I'm continuing te avoid stripping the whitespace on the RHS to preserve whatever newline characters happen to be in the original file. llvm-svn: 169222
* Teach the include sorter to not choke on include guards. ;]Chandler Carruth2012-12-031-1/+1
| | | | | | | Kind of important when prepping the include/... tree version of the sort changes. llvm-svn: 169132
* Add a completely hack-ish tool to sort includes according to the codingChandler Carruth2012-12-031-0/+79
standards. I am a terrible Python programmer. Patches more the welcome. Please tell me how this should look if it should look differently. It's just a tiny little script so it didn't make sense to go through pre-commit review, especially as someone who actually knows python may want to just rip it apart and do it The Right Way. I will be preparing a commit shortly that uses this script to canonicalize *all* of the #include lines in LLVM. Really, all of them. llvm-svn: 169125
OpenPOWER on IntegriCloud