summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/PathV2.cpp
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
commit95e4ac16a5bd7d442b45bc6bc0fd2a994bb5c7a9 (patch)
treef4053efe03ed9eb5d1310d8e7501ebea9d63a442 /llvm/lib/Support/PathV2.cpp
parent39c4621f42de732014413de1c982ca279429ac30 (diff)
downloadbcm5719-llvm-95e4ac16a5bd7d442b45bc6bc0fd2a994bb5c7a9.tar.gz
bcm5719-llvm-95e4ac16a5bd7d442b45bc6bc0fd2a994bb5c7a9.zip
Support/PathV2: Fix append to not add a slash to empty or root paths.
llvm-svn: 120988
Diffstat (limited to 'llvm/lib/Support/PathV2.cpp')
-rw-r--r--llvm/lib/Support/PathV2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/PathV2.cpp b/llvm/lib/Support/PathV2.cpp
index 2c1d92dbcac..73896edecce 100644
--- a/llvm/lib/Support/PathV2.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud