From: Michael J. Spencer Date: Mon, 6 Dec 2010 04:28:23 +0000 (+0000) Subject: Support/PathV2: Fix append to not add a slash to empty or root paths. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f150e7695e32d42856d86499fcde970825371637;p=oota-llvm.git 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 --- diff --git a/lib/Support/PathV2.cpp b/lib/Support/PathV2.cpp index 2c1d92dbcac..73896edecce 100644 --- a/lib/Support/PathV2.cpp +++ b/lib/Support/PathV2.cpp @@ -413,7 +413,7 @@ error_code append(SmallVectorImpl &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); }