Support/PathV2: Fix append to not add a slash to empty or root paths.

llvm-svn: 120988
This commit is contained in:
Michael J. Spencer 2010-12-06 04:28:23 +00:00
parent 39c4621f42
commit 95e4ac16a5
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}