diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-12-04 09:59:54 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-12-04 09:59:54 +0000 |
commit | 2aa2a9bf2b4c12aa6531cc0f842a7df0d85d6f9f (patch) | |
tree | 1722196e34a684eac80b7611c68218a0d05ab80a /llvm | |
parent | 59ff16cf7477e6f25d5c22970e70c64d60b46271 (diff) | |
download | bcm5719-llvm-2aa2a9bf2b4c12aa6531cc0f842a7df0d85d6f9f.tar.gz bcm5719-llvm-2aa2a9bf2b4c12aa6531cc0f842a7df0d85d6f9f.zip |
Teach the include sorter to skip files under test trees and under INPUTS
trees. This allows running the input sorter on the entire clang
repository cleanly now.
llvm-svn: 169247
Diffstat (limited to 'llvm')
-rwxr-xr-x | llvm/utils/sort_includes.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/utils/sort_includes.py b/llvm/utils/sort_includes.py index 855cb38ad59..c1500f52e04 100755 --- a/llvm/utils/sort_includes.py +++ b/llvm/utils/sort_includes.py @@ -13,6 +13,11 @@ import os def sort_includes(f): """Sort the #include lines of a specific file.""" + + # Skip files which are under INPUTS trees or test trees. + if 'INPUTS/' in f.name or 'test/' in f.name: + return + lines = f.readlines() look_for_api_header = os.path.splitext(f.name)[1] == '.cpp' found_headers = False |