diff options
author | Zachary Turner <zturner@google.com> | 2017-03-16 22:28:04 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-03-16 22:28:04 +0000 |
commit | 5c5091fcb7813986e8a26437379c4d59451c1af7 (patch) | |
tree | e1a8c677184d51846ccf68dd0c627c4ffdf4e5e4 /lldb/source/Commands/CommandCompletions.cpp | |
parent | eb54909c8c7381fefdb9a0ebd457fee0ebd3088c (diff) | |
download | bcm5719-llvm-5c5091fcb7813986e8a26437379c4d59451c1af7.tar.gz bcm5719-llvm-5c5091fcb7813986e8a26437379c4d59451c1af7.zip |
[Support] Support both Windows and Posix paths on both platforms.
Previously which path syntax we supported dependend on what
platform we were compiling LLVM on. While this is normally
desirable, there are situations where we need to be able to
handle a path that we know was generated on a remote host.
Remote debugging, for example, or parsing debug info.
99% of the code in LLVM for handling paths was platform
agnostic and literally just a few branches were gated behind
pre-processor checks, so this changes those sites to use
runtime checks instead, and adds a flag to every path
API that allows one to override the host native syntax.
Differential Revision: https://reviews.llvm.org/D30858
llvm-svn: 298004
Diffstat (limited to 'lldb/source/Commands/CommandCompletions.cpp')
-rw-r--r-- | lldb/source/Commands/CommandCompletions.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp index 34b7d78bd6a..985b091645e 100644 --- a/lldb/source/Commands/CommandCompletions.cpp +++ b/lldb/source/Commands/CommandCompletions.cpp @@ -123,7 +123,8 @@ static int DiskFilesOrDirectories(const llvm::Twine &partial_name, if (CompletionBuffer.startswith("~")) { llvm::StringRef Buffer(CompletionBuffer); - size_t FirstSep = Buffer.find_if(path::is_separator); + size_t FirstSep = + Buffer.find_if([](char c) { return path::is_separator(c); }); llvm::StringRef Username = Buffer.take_front(FirstSep); llvm::StringRef Remainder; |