summaryrefslogtreecommitdiff
path: root/utils/sort_includes.py
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-03 17:01:46 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-03 17:01:46 +0000
commit998aae738d2a014cb46d6e29a585fd781f95b677 (patch)
treeda8e179880bdab1dc7ce103a84fd4bc4d823f7c2 /utils/sort_includes.py
parentd04a8d4b33ff316ca4cf961e06c9e312eff8e64f (diff)
downloadllvm-998aae738d2a014cb46d6e29a585fd781f95b677.tar.gz
llvm-998aae738d2a014cb46d6e29a585fd781f95b677.tar.bz2
llvm-998aae738d2a014cb46d6e29a585fd781f95b677.tar.xz
Teach the include sorter to not choke on include guards. ;]
Kind of important when prepping the include/... tree version of the sort changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169132 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/sort_includes.py')
-rwxr-xr-xutils/sort_includes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/sort_includes.py b/utils/sort_includes.py
index 6f20cb76e4..81095d6358 100755
--- a/utils/sort_includes.py
+++ b/utils/sort_includes.py
@@ -48,7 +48,7 @@ def sort_includes(f):
# mixed with includes, the order might be sensitive.
if headers_begin != 0:
break
- if l.startswith('//') or l.startswith('#define'):
+ if l.startswith('//') or l.startswith('#define') or l.startswith('#ifndef'):
continue
break
if headers_begin == 0: