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

John Thompson john.thompson.jtsoftware at gmail.com
Thu Dec 17 20:45:55 PST 2009


> 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.
-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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20091217/b75e313c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: includetrailingsep2.patch
Type: application/octet-stream
Size: 684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20091217/b75e313c/attachment.obj>


More information about the cfe-commits mailing list