summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-02-22 18:41:01 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-02-22 18:41:01 +0000
commit7a49f7e7020ad7edab69a3b57e6633d34b138905 (patch)
tree0cf09e9ff6e31a57ca467b3cf9ccbd1018f3348b /lib/Frontend/CompilerInvocation.cpp
parent6070b7098350ea390fd0aeabde12e130f32039e9 (diff)
downloadclang-7a49f7e7020ad7edab69a3b57e6633d34b138905.tar.gz
[VFS] Add support for handling path traversals
Handle ".", ".." and "./" with trailing slashes while collecting files to be dumped into the vfs overlay directory. Include the support for symlinks into components. Given the path: /install-dir/bin/../lib/clang/3.8.0/include/altivec.h, if "bin" component is a symlink, it's not safe to use `path::remove_dots` here, and `realpath` is used to get the right answer. Since `realpath` is expensive, we only do it at collecting time (which only happens during the crash reproducer) and cache the base directory for fast lookups. Overall, this makes the input to the VFS YAML file to be canonicalized to never contain traversal components. Differential Revision: http://reviews.llvm.org/D17104 rdar://problem/24499339 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261551 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions