summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/FileSpec.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-08-23 17:13:33 +0000
committerJim Ingham <jingham@apple.com>2016-08-23 17:13:33 +0000
commit291fd3504429f2fb8ca45e7f1430d30b7da4f477 (patch)
tree0511a668f5408d106fc9281478198697242a7e89 /lldb/source/Host/common/FileSpec.cpp
parent9ec5a61358fa7e5f4af389562a62400dd7201504 (diff)
downloadbcm5719-llvm-291fd3504429f2fb8ca45e7f1430d30b7da4f477.tar.gz
bcm5719-llvm-291fd3504429f2fb8ca45e7f1430d30b7da4f477.zip
Change the PathMappingList::FindFile to use FileSpec API's
Also, when appending path components, collapse multiple "/" into one at the join. llvm-svn: 279533
Diffstat (limited to 'lldb/source/Host/common/FileSpec.cpp')
-rw-r--r--lldb/source/Host/common/FileSpec.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp
index 53c0ab40e67..62117b78f06 100644
--- a/lldb/source/Host/common/FileSpec.cpp
+++ b/lldb/source/Host/common/FileSpec.cpp
@@ -1552,6 +1552,9 @@ FileSpec::AppendPathComponent(const char *new_path)
stream.PutChar(GetPrefferedPathSeparator(m_syntax));
}
+ while (IsPathSeparator(new_path[0], m_syntax))
+ new_path++;
+
stream.PutCString(new_path);
const bool resolve = false;
OpenPOWER on IntegriCloud