diff options
Diffstat (limited to 'llvm/lib/Support/Windows/Path.inc')
-rw-r--r-- | llvm/lib/Support/Windows/Path.inc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index 45d73ae3dfe..678c9a819d8 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/lib/Support/Windows/Path.inc @@ -1253,6 +1253,17 @@ static void expandTildeExpr(SmallVectorImpl<char> &Path) { Path.insert(Path.begin() + 1, HomeDir.begin() + 1, HomeDir.end()); } +void expand_tilde(const Twine &path, SmallVectorImpl<char> &dest) { + dest.clear(); + if (path.isTriviallyEmpty()) + return; + + path.toVector(dest); + expandTildeExpr(dest); + + return; +} + std::error_code real_path(const Twine &path, SmallVectorImpl<char> &dest, bool expand_tilde) { dest.clear(); |