jyknight added a comment.

In https://reviews.llvm.org/D34158#823316, @fedor.sergeev wrote:

> Hmm... I tried this patch and now the following worries me:
>
> - it passes -finclude-if-exists stdc-predef.h on all platforms (say, 
> including my Solaris platform that has no system stdc-predef.h)


Right, but Solaris probably _ought_ to add one as well, to define those macros.

> - it searches all the paths, not just "system include" ones
> 
>   That essentially disallows user to have stdc-predef.h include in my own 
> project, since there is a chance that this user header will be accidentally 
> included by this hidden machinery.

IMO, this is a fairly negligible issue, and so we go *shrug* oh well.

+1 for using a <> include -- that does seem better.

>> If I make a change like this: CmdArgs.push_back("<stdc-predef.h>"); the 
>> program fails to pre-include std-predef.h; so I assume that there is 
>> something that needs to be fixed with this line: 
>> Opts.FIncludeIfExists.emplace_back(A->getValue());   If we want those <> in 
>> there, but no extra " in there, I would need to study which value is 
>> returned and fiddle around with the characters to make sure the right thing 
>> gets put into the input stream. This will take me quite a bit more time 
>> since I know close to diddly at this point.

But, note, that will have no effect w.r.t. this issue for most users, since 
typically people use "cc -Isomepath", which adds 'somepath' to the list which 
gets searched by both <> and "" includes. Hardly anyone uses -iquote.


Repository:
  rL LLVM

https://reviews.llvm.org/D34158



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

Reply via email to