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 | d0eb39232c3ef9d6deaa592dcdef49ea3afe1169 (patch) | |
tree | dc3e1fbbc052f52c6140b788d56458bf2b713d3b /llvm/utils/sort_includes.py | |
parent | 050948a5a52f7445036c3ff5212a58f2b256bfaa (diff) | |
download | bcm5719-llvm-d0eb39232c3ef9d6deaa592dcdef49ea3afe1169.tar.gz bcm5719-llvm-d0eb39232c3ef9d6deaa592dcdef49ea3afe1169.zip |
Teach sort_includes.py to drop duplicated includes.
llvm-svn: 170911
Diffstat (limited to 'llvm/utils/sort_includes.py')
-rwxr-xr-x | llvm/utils/sort_includes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/sort_includes.py b/llvm/utils/sort_includes.py index 8ff7d059c4f..fef97550db8 100755 --- a/llvm/utils/sort_includes.py +++ b/llvm/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:] |