summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-03-16 22:28:04 +0000
committerZachary Turner <zturner@google.com>2017-03-16 22:28:04 +0000
commit5c5091fcb7813986e8a26437379c4d59451c1af7 (patch)
treee1a8c677184d51846ccf68dd0c627c4ffdf4e5e4 /llvm/lib/Support/Windows
parenteb54909c8c7381fefdb9a0ebd457fee0ebd3088c (diff)
downloadbcm5719-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 'llvm/lib/Support/Windows')
-rw-r--r--llvm/lib/Support/Windows/Path.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index f8a75a21e48..97682c11839 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/lib/Support/Windows/Path.inc
@@ -1023,7 +1023,7 @@ static void expandTildeExpr(SmallVectorImpl<char> &Path) {
StringRef PathStr(Path.begin(), Path.size());
PathStr = PathStr.drop_front();
- StringRef Expr = PathStr.take_until(path::is_separator);
+ StringRef Expr = PathStr.take_until([](char c) { return path::is_separator(c); });
if (!Expr.empty()) {
// This is probably a ~username/ expression. Don't support this on Windows.
OpenPOWER on IntegriCloud