[llvm-commits] [llvm] r170911 - /llvm/trunk/utils/sort_includes.py
Benjamin Kramer
benny.kra at googlemail.com
Fri Dec 21 10:00:09 PST 2012
Author: d0k
Date: Fri Dec 21 12:00:08 2012
New Revision: 170911
URL: http://llvm.org/viewvc/llvm-project?rev=170911&view=rev
Log:
Teach sort_includes.py to drop duplicated includes.
Modified:
llvm/trunk/utils/sort_includes.py
Modified: llvm/trunk/utils/sort_includes.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/sort_includes.py?rev=170911&r1=170910&r2=170911&view=diff
==============================================================================
--- llvm/trunk/utils/sort_includes.py (original)
+++ llvm/trunk/utils/sort_includes.py Fri Dec 21 12:00:08 2012
@@ -64,9 +64,9 @@
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:]
More information about the llvm-commits
mailing list