[Lldb-commits] [PATCH] Make FileSpec::Dump use FileSpec::GetPath(), not the other way around.

Zachary Turner zturner at google.com
Wed May 27 16:11:57 PDT 2015


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/fe531c47/attachment.html>


More information about the lldb-commits mailing list