[Lldb-commits] [PATCH] Make FileSpec::Dump use FileSpec::GetPath(), not the other way around.
Chaoren Lin
chaorenl at google.com
Wed May 27 16:15:12 PDT 2015
>
> GetPath() is supposed to have not put a trailing slash in that case.
But it should (the only case in which it should). `'/'`(root directory) is
not the same as an empty (invalid) path.
On Wed, May 27, 2015 at 4:11 PM, Zachary Turner <zturner at google.com> wrote:
> GetPath() is supposed to have not put a trailing slash in that case. See
> the call to rtrim() in GetPath()
> On Wed, May 27, 2015 at 3:14 PM Chaoren Lin <chaorenl at google.com> wrote:
>
>> ================
>> Comment at: source/Host/common/FileSpec.cpp:630
>> @@ +629,3 @@
>> + std::string path = GetPath();
>> + if (!m_filename && !path.empty())
>> + path.push_back(GetPathSeparator());
>> ----------------
>> What if `path == "/"`?
>>
>> ================
>> Comment at: source/Host/common/FileSpec.cpp:844
>> @@ +843,3 @@
>> + {
>> + if (m_directory)
>> + path.push_back('/');
>> ----------------
>> What if `m_directory == '/'`? We'd get `//filename`.
>>
>> http://reviews.llvm.org/D9942
>>
>> EMAIL PREFERENCES
>> http://reviews.llvm.org/settings/panel/emailpreferences/
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150527/fc765494/attachment.html>
More information about the lldb-commits
mailing list