[PATCH] D33788: Return a canonical path from getClangResourcePath()

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 2 09:38:08 PDT 2017


aaron.ballman added a comment.

In https://reviews.llvm.org/D33788#771504, @akyrtzi wrote:

> Getting the real path is notoriously slow (at least it's horrible in OSX, not sure about linux). Since this is about dropping the '/../' part, could we do some simple canonicalization of removing the dots ? Not sure if there is an existing function that does that.


Given the fact that this path is cached, so you only need to do the slow path one time, are you sure that's a practical concern? I'm unaware of any other API that canonicalizes the path, which is what users of this API are going to expect.


https://reviews.llvm.org/D33788





More information about the cfe-commits mailing list