mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 05:32:25 +00:00
Teach sort_includes.py to drop duplicated includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170911 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2556c6b4b6
commit
c851438e3f
@ -64,9 +64,9 @@ def sort_includes(f):
|
||||
if not found_headers:
|
||||
return
|
||||
|
||||
local_headers.sort()
|
||||
project_headers.sort()
|
||||
system_headers.sort()
|
||||
local_headers = sorted(set(local_headers))
|
||||
project_headers = sorted(set(project_headers))
|
||||
system_headers = sorted(set(system_headers))
|
||||
headers = api_headers + local_headers + project_headers + system_headers
|
||||
header_lines = ['#include ' + h for h in headers]
|
||||
lines = lines[:headers_begin] + header_lines + lines[headers_end + 1:]
|
||||
|
Loading…
Reference in New Issue
Block a user