aaron.ballman added a comment. In https://reviews.llvm.org/D33788#771671, @bruno wrote:
> > I'm unaware of any other API that canonicalizes the path, which is what > > users of this API are going to expect. > > You can also call `sys::path::remove_dots(Path, /*remove_dot_dot=*/true);` Yes, but that does not canonicalize the path. For instance, it won't handle doubled-up slashes or symlinks. Ultimately, the value returned from this API gets passed to POSIX functions which expect a canonical path. I don't think `remove_dots()` is sufficient. It should do the same thing as `getMainExecutable()`, I believe. > > >> There's already a test case that covers this: Index/pch-from-libclang.c -- >> it was failing on OS X 10.6 for us. If you have a better test case in mind, >> I can certainly add it. > > Works for me. https://reviews.llvm.org/D33788 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits