[PATCH] D19842: In openFileForRead, attempt to fetch the actual name of the file on disk -- including case -- so that clang can later warn about non-portable #include and #import directives.

Bruno Cardoso Lopes via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 22:00:22 PDT 2016


bruno added a comment.

Hi Eric,

Thanks for working on this. :-)

Can you split the functionality that gets the RealPath into a new function (something like llvm::sys::fs::canonical() or llvm::sys::fs::realpath()) and make openFileForRead calls it? Ideally, this function should have an optional FD argument that can be used by openFileForRead or any other client in order to obtain the fast path for obtaining the real path, but should also contain the implementation for the slow path (in case FD isn't available).

This is going to be useful for a bunch of other client in clang that are now obtaining realpath in a adhoc/slow ways.


http://reviews.llvm.org/D19842





More information about the llvm-commits mailing list