[lld] r230729 - Update comments, fix typos.

Davide Italiano davide at freebsd.org
Thu Feb 26 21:00:53 PST 2015


On Thu, Feb 26, 2015 at 8:23 PM, Rui Ueyama <ruiu at google.com> wrote:
> Author: ruiu
> Date: Thu Feb 26 22:23:21 2015
> New Revision: 230729

[...]

>
> +  // This is equivalent to strnlen, but we don't use the function because
> +  // it only exists in recent POSIX standards.
>    size_t len = 0;
>    size_t e = array.size();
>    while (len < e && array[len] != '\0')
>      ++len;
> +
>    std::string *contents =
>        new (_alloc) std::string(reinterpret_cast<const char *>(&array[0]), len);
>    return StringRef(*contents).trim();
>

Is this newline intentional? If yes, can you explain what's the reason?



More information about the llvm-commits mailing list