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 | fd025797ea5197b838f87ce57f2df5bccf27ad20 (patch) | |
tree | 187c387e4f695e76f2f1a0dca8d2a20cecb9ddd5 /utils/sort_includes.py | |
parent | 1ff3d66222634fabad236423e454c0b9bd631084 (diff) | |
download | llvm-fd025797ea5197b838f87ce57f2df5bccf27ad20.tar.gz llvm-fd025797ea5197b838f87ce57f2df5bccf27ad20.tar.bz2 llvm-fd025797ea5197b838f87ce57f2df5bccf27ad20.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/sort_includes.py')
-rwxr-xr-x | utils/sort_includes.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/sort_includes.py b/utils/sort_includes.py index 855cb38ad5..c1500f52e0 100755 --- a/utils/sort_includes.py +++ b/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 |