about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-02-17 11:32:16 +0000
committerbors <bors@rust-lang.org>2018-02-17 11:32:16 +0000
commitb298607864b76ea6b7b7a4b8bb482472f1604c8d (patch)
tree157995013480f83a3716e45277bdccad4171f89d /src/rustllvm/PassWrapper.cpp
parentb85bd51c944f8cbe3a9c4cc95b61e08e5f338052 (diff)
parent9269e83b37e8e5fd9cef12255fafbc6db6220035 (diff)
downloadrust-b298607864b76ea6b7b7a4b8bb482472f1604c8d.tar.gz
rust-b298607864b76ea6b7b7a4b8bb482472f1604c8d.zip
Auto merge of #47956 - retep998:is-nibbles, r=BurntSushi
This is the ideal FileType on Windows. You may not like it, but this is what peak performance looks like.

Theoretically this would fix https://github.com/rust-lang/rust/issues/46484

The current iteration of this PR should not cause existing code to break, but instead merely improves handling around reparse points. Specifically...

* Reparse points are considered to be symbolic links if they have the name surrogate bit set. Name surrogates are reparse points that effectively act like symbolic links, redirecting you to a different directory/file. By checking for this bit instead of specific tags, we become much more general in our handling of reparse points, including those added by third parties.
* If something is a reparse point but does not have the name surrogate bit set, then we ignore the fact that it is a reparse point because it is actually a file or directory directly there, despite having additional handling by drivers due to the reparse point.
* For everything which is not a symbolic link (including non-surrogate reparse points) we report whether it is a directory or a file based on the presence of the directory attribute bit.
* Notably this still preserves invariant that when `is_symlink` returns `true`, both `is_dir` and `is_file` will return `false`. The potential for breakage was far too high.
* Adds an unstable `FileTypeExt` to allow users to determine whether a symbolic link is a directory or a file, since `FileType` by design is incapable of reporting this information.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions