summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-04 09:59:54 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-04 09:59:54 +0000
commit2aa2a9bf2b4c12aa6531cc0f842a7df0d85d6f9f (patch)
tree1722196e34a684eac80b7611c68218a0d05ab80a /llvm
parent59ff16cf7477e6f25d5c22970e70c64d60b46271 (diff)
downloadbcm5719-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-xllvm/utils/sort_includes.py5
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
OpenPOWER on IntegriCloud