aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-06 04:28:23 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-06 04:28:23 +0000
commitf150e7695e32d42856d86499fcde970825371637 (patch)
tree95a1a62d9faabcf05e3b6da29bc80733f592a4a0 /lib/Support
parent7eec50bf4f9d050323c0da9ac61ac3b150e4e5b1 (diff)
downloadexternal_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.cpp2
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);
}