aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2018-11-20 21:13:51 +0000
committerSimon Atanasyan <simon@atanasyan.com>2018-11-20 21:13:51 +0000
commit13cacb274ad5ff44d6ba56b454bbd6a276fda0d8 (patch)
treebf65967e65ff440380ca98927f628bc455ccb605 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent02e1f1915f94413a64efd295fa3dc63d40046fcf (diff)
downloadllvm-13cacb274ad5ff44d6ba56b454bbd6a276fda0d8.zip
llvm-13cacb274ad5ff44d6ba56b454bbd6a276fda0d8.tar.gz
llvm-13cacb274ad5ff44d6ba56b454bbd6a276fda0d8.tar.bz2
[unittests] Fix ExpandTilde test to match handling home dirs with trailing slash
The `expandTildeExpr` routine just replaces a tilde by a home dir path. If the home dir has a trailing slash, the result of substitution will contain double slashes. For example, `HOME=/foo/ ~/bar` gives `/foo//bar`. That corresponds to (at least) Bash behaviour because the following command `$HOME=/foo/ echo ~/bar` prints `/foo//bar`. The `ExpandTilde` test constructs a path expected as the `fs::expand_tilde` call result by calling `path::append` and the expected path has a single slash. This patch fixes that and allows to pass the unittest on hosts where the `HOME` is `/`. Differential Revision: http://reviews.llvm.org/D54752 llvm-svn: 347346
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions