Go to file
Zachary Turner d5bd3a1e6a Make file / directory completion work properly on Windows.
There were a couple of problems with this function on Windows. Different
separators and differences in how tilde expressions are resolved for
starters, but in addition there was no clear indication of what the
function's inputs or outputs were supposed to be, and there were no tests
to demonstrate its use.

To more easily paper over the differences between Windows paths,
non-Windows paths, and tilde expressions, I've ported this function to use
LLVM-based directory iteration (in fact, I would like to eliminate all of
LLDB's directory iteration code entirely since LLVM's is cleaner / more
efficient (i.e. it invokes fewer stat calls)). and llvm's portable path
manipulation library.

Since file and directory completion assumes you are referring to files and
directories on your local machine, it's safe to assume the path syntax
properties of the host in doing so, so LLVM's APIs are perfect for this.

I've also added a fairly robust set of unit tests. Since you can't really
predict what users will be on your machine, or what their home directories
will be, I added an interface called TildeExpressionResolver, and in the
unit test I've mocked up a fake implementation that acts like a unix
password database. This allows us to configure some fake users and home
directories in the test, so we can exercise all of those hard-to-test
codepaths that normally otherwise depend on the host.

Differential Revision: https://reviews.llvm.org/D30789

llvm-svn: 297585
2017-03-12 18:18:50 +00:00
clang [AVX-512] Fix avx512vl gather builtins to require the scale argument to be an ICE like the rest of the gather builtins. 2017-03-12 17:58:12 +00:00
clang-tools-extra [clang-rename] Introduce an unittest skeleton for clang-rename. 2017-03-10 10:30:14 +00:00
compiler-rt Revert "[Builtin] Implement lit-test support" 2017-03-11 20:53:01 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx fix test coverage capture dirs 2017-03-11 05:28:09 +00:00
libcxxabi Fully Reformat fallback_malloc.cpp 2017-03-04 03:23:15 +00:00
libunwind Fix up the places where AddressSpace.hpp is included. 2017-03-09 08:04:07 +00:00
lld [ELF] Handle NONE relocations on AArch64 2017-03-10 22:42:22 +00:00
lldb Make file / directory completion work properly on Windows. 2017-03-12 18:18:50 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm [LVI] Add Datalayout to the class LazyValueInfo since all its Impls require it. NFC 2017-03-12 14:06:41 +00:00
openmp Create a git ignore file for openmp runtime. 2017-03-11 13:05:08 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Possible error in doc comment 2017-03-12 08:19:01 +00:00