[llvm-commits] [llvm] r169247 - /llvm/trunk/utils/sort_includes.py
Chandler Carruth
chandlerc at gmail.com
Tue Dec 4 01:59:54 PST 2012
Author: chandlerc
Date: Tue Dec 4 03:59:54 2012
New Revision: 169247
URL: http://llvm.org/viewvc/llvm-project?rev=169247&view=rev
Log:
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.
Modified:
llvm/trunk/utils/sort_includes.py
Modified: llvm/trunk/utils/sort_includes.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/sort_includes.py?rev=169247&r1=169246&r2=169247&view=diff
==============================================================================
--- llvm/trunk/utils/sort_includes.py (original)
+++ llvm/trunk/utils/sort_includes.py Tue Dec 4 03:59:54 2012
@@ -13,6 +13,11 @@
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
More information about the llvm-commits
mailing list