]> granicus.if.org Git - clang/commit
emulate a bit of GCC path lookup weirdness: if a system
authorChris Lattner <sabre@nondot.org>
Fri, 26 Sep 2008 17:46:45 +0000 (17:46 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 26 Sep 2008 17:46:45 +0000 (17:46 +0000)
commit7a739401983eb9bc25c9b4b25177e116f5e5ba92
tree109ccdb6e8e0ad456dba54bb73c31485b8d17611
parent3527b59f246cde170e6877e3e62f78a95dbcdfce
emulate a bit of GCC path lookup weirdness: if a system
directory is shadowed by a user directory in the lookup
path, ignore the user directory not the system one.  Not
doing this can affect file lookup and the "is a system
header" bit on locations.  For example:
  clang -v -I/usr/include inc.c -E | & grep /usr/inc
now prints:

# 1 "/usr/include/i386/_types.h" 1 3 4
# 37 "/usr/include/i386/_types.h" 3 4
# 70 "/usr/include/i386/_types.h" 3 4

instead of:

# 1 "/usr/include/i386/_types.h" 1
# 37 "/usr/include/i386/_types.h"
# 70 "/usr/include/i386/_types.h"

This is part of rdar://6243860.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56669 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/InitHeaderSearch.cpp