projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2aa2a9b
)
Teach the include sorter to quickly skip files with an extension that
author
Chandler Carruth
<chandlerc@gmail.com>
Tue, 4 Dec 2012 10:08:59 +0000
(10:08 +0000)
committer
Chandler Carruth
<chandlerc@gmail.com>
Tue, 4 Dec 2012 10:08:59 +0000
(10:08 +0000)
doesn't look like it will have C++ code in it.
Suggestions on a better heuristic are welcome.
llvm-svn: 169248
llvm/utils/sort_includes.py
patch
|
blob
|
history
diff --git
a/llvm/utils/sort_includes.py
b/llvm/utils/sort_includes.py
index
c1500f5
..
8ff7d05
100755
(executable)
--- a/
llvm/utils/sort_includes.py
+++ b/
llvm/utils/sort_includes.py
@@
-18,8
+18,12
@@
def sort_includes(f):
if 'INPUTS/' in f.name or 'test/' in f.name:
return
+ ext = os.path.splitext(f.name)[1]
+ if ext not in ['.cpp', '.c', '.h', '.inc', '.def']:
+ return
+
lines = f.readlines()
- look_for_api_header =
os.path.splitext(f.name)[1] == '.cpp'
+ look_for_api_header =
ext in ['.cpp', '.c']
found_headers = False
headers_begin = 0
headers_end = 0