simon_tatham added a comment.

@thakis : no, the backslash support is needed for include directives //in 
source files//, not just on command lines, because in my experience it's not 
unusual for Windows-only code bases to be full of things like `#include 
"Subdir\Header.h"`.

@mstorsjo : in this draft, I traverse the pathname from left to right, and at 
each level, if the normal case-sensitive lookup succeeds then I don't scan the 
whole directory looking for other options. As I mentioned above, though, I've 
since realised I should have done it the other way round, trying the case 
sensitive lookup on the //whole// pathname in one go first, and not even trying 
it one level at a time unless that fails.

Although, come to think of it, that's not good enough, because if you have 
multiple directories on your include //path// then you expect a lot of lookups 
to fail for reasons that have nothing to do with case. Say, if you compile with 
`-Ifoo -Ibar`, then every include of a file intended to be found in `bar` will 
force lots of pointless directory enumeration in `foo` when the initial lookup 
there doesn't find the file. Hmmm. That suggests to me that perhaps this ought 
not to be a //global// `-ffudge-my-paths` type option applying to all include 
directories, and instead perhaps it should be a new kind of `-I` option, so 
that only lookups relative to that particular include-path directory would get 
the unusual semantics. What do people think?


Repository:
  rC Clang

https://reviews.llvm.org/D48626



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to