Skip to content

Commit

Permalink
Teach the include sorter to not choke on include guards. ;]
Browse files Browse the repository at this point in the history
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
  • Loading branch information
chandlerc committed Dec 3, 2012
1 parent d04a8d4 commit 998aae7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/sort_includes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 998aae7

Please sign in to comment.