summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-03-31 06:42:10 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-04-01 09:21:33 (GMT)
commita79db8d446e152b715f435550c2a6e10a36ee532 (patch)
tree8fb928a0cb2f828954575a92d17702e2178eb3bd /BuildTools
parentcfbdb43d2cadd40aa87338d41548e4bf89e146e6 (diff)
downloadswift-a79db8d446e152b715f435550c2a6e10a36ee532.zip
swift-a79db8d446e152b715f435550c2a6e10a36ee532.tar.bz2
Specifically handle Slimber/Limber in FixIncludes.py
Additionally improve handling of the corresponding header. Test-Information: This version of FixIncludes has been used in the recent include fixing of all source files in the repository. Change-Id: I70c8ef0a51d8e1a3b458fbd6f886c7d5b5259949
Diffstat (limited to 'BuildTools')
-rwxr-xr-xBuildTools/FixIncludes.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/BuildTools/FixIncludes.py b/BuildTools/FixIncludes.py
index 0780a5b..d409a2c 100755
--- a/BuildTools/FixIncludes.py
+++ b/BuildTools/FixIncludes.py
@@ -19,7 +19,7 @@ c_stdlib_headers = Set(["assert.h", "limits.h", "signal.h", "stdlib.h", "ctyp
cpp_stdlib_headers = Set(["algorithm", "fstream", "list", "regex", "typeindex", "array", "functional", "locale", "set", "typeinfo", "atomic", "future", "map", "sstream", "type_traits", "bitset", "initializer_list", "memory", "stack", "unordered_map", "chrono", "iomanip", "mutex", "stdexcept", "unordered_set", "codecvt", "ios", "new", "streambuf", "utility", "complex", "iosfwd", "numeric", "string", "valarray", "condition_variable", "iostream", "ostream", "strstream", "vector", "deque", "istream", "queue", "system_error", "exception", "iterator", "random", "thread", "forward_list", "limits", "ratio", "tuple", "cassert", "ciso646", "csetjmp", "cstdio", "ctime", "cctype", "climits", "csignal", "cstdlib", "cwchar", "cerrno", "clocale", "cstdarg", "cstring", "cwctype", "cfloat", "cmath", "cstddef"])
class HeaderType:
- PRAGMA_ONCE, CORRESPONDING_HEADER, C_STDLIB, CPP_STDLIB, BOOST, QT, OTHER, SWIFTEN, SWIFT_CONTROLLERS, SLUIFT, SWIFTOOLS, SWIFT = range(12)
+ PRAGMA_ONCE, CORRESPONDING_HEADER, C_STDLIB, CPP_STDLIB, BOOST, QT, OTHER, SWIFTEN, LIMBER, SLIMBER, SWIFT_CONTROLLERS, SLUIFT, SWIFTOOLS, SWIFT = range(14)
def findHeaderBlock(lines):
start = False
@@ -46,7 +46,7 @@ def lineToFileName(line):
return False
def fileNameToHeaderType(name):
- if name.endswith(filename_name + ".h"):
+ if name.endswith("/" + filename_name + ".h"):
return HeaderType.CORRESPONDING_HEADER
if name in c_stdlib_headers:
@@ -64,6 +64,12 @@ def fileNameToHeaderType(name):
if name.startswith("Swiften"):
return HeaderType.SWIFTEN
+ if name.startswith("Limber"):
+ return HeaderType.LIMBER
+
+ if name.startswith("Slimber"):
+ return HeaderType.SLIMBER
+
if name.startswith("Swift/Controllers"):
return HeaderType.SWIFT_CONTROLLERS