Avoid failure to canonicalize '..'.
authorSean Silva <chisophugis@gmail.com>
Thu, 30 Jul 2015 00:26:34 +0000 (00:26 +0000)
committerSean Silva <chisophugis@gmail.com>
Thu, 30 Jul 2015 00:26:34 +0000 (00:26 +0000)
commitb963dedbe87ba04fafb9433bbc345dbd1c3391ee
tree8702834c1497491371333f51f82c9bea45175475
parent5bfbb36a09fac45bd0230fceb42a58e3c1977620
Avoid failure to canonicalize '..'.

Also fix completely broken and untested code which was hiding the
primary bug. The !LLVM_ON_UNIX branch of the ifdef was actually a no-op.

I ran into this in the wild. It was causing failures in our SDK build.

Ideally we'd have a perfect llvm::sys::fs::canonical, but at least this
is a step in the right direction, and fixes an obviously broken case.
In some sense the test case I've added here is an integration test. We
should have these routines thoroughly unit tested in llvm::sys::fs.

llvm-svn: 243597
clang/lib/Basic/FileManager.cpp
clang/test/Modules/Inputs/module-map-path-hash/a.h [new file with mode: 0644]
clang/test/Modules/Inputs/module-map-path-hash/module.modulemap [new file with mode: 0644]
clang/test/Modules/module-map-path-hash.cpp [new file with mode: 0644]