1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

Teach sort_includes.py to drop duplicated includes.

llvm-svn: 170911
This commit is contained in:
Benjamin Kramer 2012-12-21 18:00:08 +00:00
parent 9297ff5d80
commit fee2de20ab

View File

@ -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:]