[Lldb-commits] [PATCH] D28677: FileSpec: Fix PrependPathComponent("/")

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 13 06:19:55 PST 2017


labath created this revision.
labath added reviewers: clayborg, zturner.
labath added a subscriber: lldb-commits.

PrependPathComponent was unconditionally inserting path separators between the
path components. This is not correct if the prepended path is "/", which caused
problems down the line. Fix the function to use the same algorithm as
AppendPathComponent and add a test. This fixes one part of llvm.org/pr31611.


https://reviews.llvm.org/D28677

Files:
  source/Host/common/FileSpec.cpp
  unittests/Host/FileSpecTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28677.84294.patch
Type: text/x-patch
Size: 3939 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170113/f21832c7/attachment.bin>


More information about the lldb-commits mailing list