[cfe-dev] New warning for mismatched include case

Joshua Warner allpowerful32 at gmail.com
Fri Jul 27 11:34:25 PDT 2012


On windows, at least, there is an API that could help with this: just get a
(windows) handle to the file via OpenFile / CreateFile, then query the
handle's filename.  See
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366789(v=vs.85).aspx
.

I suspect there are similar ways to do it for mac and linux.

-Joshua

On 27 July 2012 12:02, Chris Lattner <clattner at apple.com> wrote:

> On Jul 27, 2012, at 10:13 AM, Jason Haslam wrote:
> >> I wrote a little script to generate a torture test for this warning
> like I proposed before.  It consists of a source file with 4096 different
> #includes in 64 directories where each directory contains an additional
> 4096 files. As expected, it is many times slower with the warning enabled
> than without on the existing implementation. It goes from .08 seconds
> without the warning up to 5 seconds with the warning.
> >>
> >> I also tried the readdir caching optimization that I mentioned before.
> It brings the time with the warning down to .35 seconds. On real code it's
> still well below 1% difference. So what do you think? Is this just too
> risky to add? Updated patch is attached.
> >
> > Ugh! Ignore the previous patch. This one actually works correctly.
>
> Ok, the best person to review this is Argyrios, and unfortunately he's out
> on vacation until August 20th...
>
> -Chris
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120727/fc2070d4/attachment.html>


More information about the cfe-dev mailing list