[cfe-commits] [PATCH] fix trailing separator in include path

Chris Lattner clattner at apple.com
Thu Dec 17 21:37:07 PST 2009


On Dec 17, 2009, at 8:45 PM, John Thompson wrote:

> > Second, should this really go in InitHeaderSearch?  Would it make more sense to put in the getDirectory call itself?
> Yes.  The enclosed is probably better.

Works for me, please commit.  If you feel crazy, it would be nice to change getDirectory to take a stringref instead of two pointers :)

-Chris

> -John
> On Thu, Dec 17, 2009 at 2:41 PM, Chris Lattner <clattner at apple.com> wrote:
> 
> On Dec 17, 2009, at 1:08 PM, John Thompson wrote:
> 
> > The stat function on Windows doesn't like a path with a trailing separator like:  ../../
> > This patch works around thant, but I don't know if it's the optimal solution.
> 
> Two issues.  First, that idiom for using endswith currently generates gross code.  We should fix this (http://llvm.org/bugs/show_bug.cgi?id=5822), but until then, please just check MappedPath.back() == '/' or something.
> 
> Second, should this really go in InitHeaderSearch?  Would it make more sense to put in the getDirectory call itself?
> 
> -Chris
> 
> 
> 
> -- 
> John Thompson
> John.Thompson.JTSoftware at gmail.com
> 
> <includetrailingsep2.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20091217/f9ba1258/attachment.html>


More information about the cfe-commits mailing list