summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/FileSpec.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-05-05 20:26:58 +0000
committerGreg Clayton <gclayton@apple.com>2015-05-05 20:26:58 +0000
commit9c284c4d7a08872b90016321d29e41832e48db59 (patch)
treeb9f5c576833de18a1b69092d2ad6faf4f0b91418 /lldb/source/Host/common/FileSpec.cpp
parent7ecb0714be826145fa69fdf42956203f0d8bd39a (diff)
downloadbcm5719-llvm-9c284c4d7a08872b90016321d29e41832e48db59.tar.gz
bcm5719-llvm-9c284c4d7a08872b90016321d29e41832e48db59.zip
Make sure that the following paths say they are equal:
/private/tmp/main.cpp /private/tmp/..//tmp/main.cpp We saw paths like this in makefile generate binaries when someone left an extra '/' on the end of a makefile variable. <rdar://problem/18945972> llvm-svn: 236541
Diffstat (limited to 'lldb/source/Host/common/FileSpec.cpp')
-rw-r--r--lldb/source/Host/common/FileSpec.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp
index a3f5e6d7c10..36fddc170fe 100644
--- a/lldb/source/Host/common/FileSpec.cpp
+++ b/lldb/source/Host/common/FileSpec.cpp
@@ -558,6 +558,8 @@ FileSpec::RemoveBackupDots (const ConstString &input_const_str, ConstString &res
{
if (had_dots)
{
+ while (before_sep.startswith("//"))
+ before_sep = before_sep.substr(1);
if (!before_sep.empty())
{
result.append(before_sep.data(), before_sep.size());
OpenPOWER on IntegriCloud