diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-12-21 18:00:08 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-12-21 18:00:08 +0000 |
commit | c851438e3f2c587c5b8fb7ec4bf179798532b9f3 (patch) | |
tree | 831a43f94c26cc92f6dba77627ad045d08d564d0 | |
parent | 2556c6b4b67c4a45ad90b256d4913f2048d2fba6 (diff) | |
download | llvm-c851438e3f2c587c5b8fb7ec4bf179798532b9f3.tar.gz llvm-c851438e3f2c587c5b8fb7ec4bf179798532b9f3.tar.bz2 llvm-c851438e3f2c587c5b8fb7ec4bf179798532b9f3.tar.xz |
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
-rwxr-xr-x | utils/sort_includes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/sort_includes.py b/utils/sort_includes.py index 8ff7d059c4..fef97550db 100755 --- a/utils/sort_includes.py +++ b/utils/sort_includes.py @@ -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:] |