]> granicus.if.org Git - clang/commit
Canonicalize path names in the file manager before performing a lookup
authorDouglas Gregor <dgregor@apple.com>
Wed, 2 Feb 2011 22:30:17 +0000 (22:30 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 2 Feb 2011 22:30:17 +0000 (22:30 +0000)
commitaa596e877062ddd45d65705622a58587c5ba54b6
tree768e33d181407847b90b6ab90ec3d5972a1e6f5c
parentfa275dfad7c4eb053ffef423a863afbe15534476
Canonicalize path names in the file manager before performing a lookup
on that name. Canonicalization eliminates silliness such as "." and
"foo/.." that breaks the uniquing of files in the presence of virtual
files or files whose inode numbers have changed during
parsing/re-parsing. c-index-test isn't able to create this crazy
situation, so I've resorted to testing outside of the Clang
tree. Fixes <rdar://problem/8928220>.

Note that this hackery will go away once we have a real virtual file
system on which we can layer FileManager; the virtual-files hack is
showing cracks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124754 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/FileManager.cpp