diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-06 04:28:23 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-06 04:28:23 +0000 |
commit | f150e7695e32d42856d86499fcde970825371637 (patch) | |
tree | 95a1a62d9faabcf05e3b6da29bc80733f592a4a0 /lib/Support | |
parent | 7eec50bf4f9d050323c0da9ac61ac3b150e4e5b1 (diff) | |
download | external_llvm-f150e7695e32d42856d86499fcde970825371637.zip external_llvm-f150e7695e32d42856d86499fcde970825371637.tar.gz external_llvm-f150e7695e32d42856d86499fcde970825371637.tar.bz2 |
Support/PathV2: Fix append to not add a slash to empty or root paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/PathV2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/PathV2.cpp b/lib/Support/PathV2.cpp index 2c1d92d..73896ed 100644 --- a/lib/Support/PathV2.cpp +++ b/lib/Support/PathV2.cpp @@ -413,7 +413,7 @@ error_code append(SmallVectorImpl<char> &path, const Twine &a, continue; } - if (!component_has_sep && !(path.empty() && is_root_name)) { + if (!component_has_sep && !(path.empty() || is_root_name)) { // Add a separator. path.push_back(prefered_separator); } |