mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-26 14:16:12 +00:00
Teach the include sorter to quickly skip files with an extension that
doesn't look like it will have C++ code in it. Suggestions on a better heuristic are welcome. llvm-svn: 169248
This commit is contained in:
parent
64bbcb3d1f
commit
2fffa5c0d2
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user