From: Chandler Carruth Date: Mon, 3 Dec 2012 17:01:46 +0000 (+0000) Subject: Teach the include sorter to not choke on include guards. ;] X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=998aae738d2a014cb46d6e29a585fd781f95b677;p=oota-llvm.git 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 --- diff --git a/utils/sort_includes.py b/utils/sort_includes.py index 6f20cb76e48..81095d63585 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: