[PATCH] D20724: [pdb] Apply zero-copy algorithms to symbol stream iteration

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 08:46:24 PDT 2016


I could pass 2 template arguments instead, ValueType and extraction functor
separately. Similar to std::map how you can pass a comparison functor
On Fri, May 27, 2016 at 8:41 AM Rui Ueyama <ruiu at google.com> wrote:

> ruiu added a comment.
>
> OK, I wouldn't make a trait class at this moment as it has already lots of
> meta programming, but it's your call.
>
>
> ================
> Comment at: include/llvm/DebugInfo/CodeView/RecordIterator.h:41-44
> @@ +40,6 @@
> +    Item.Type = static_cast<Kind>(uint16_t(Prefix->RecordKind));
> +    if (auto EC = Reader.readBytes(Item.Length - 2, Item.Data)) {
> +      consumeError(std::move(EC));
> +      return 0;
> +    }
> +    return Prefix->RecordLen + 2;
> ----------------
> Don't you want to propagate the error up to the caller? Hiding errors in a
> deep function call seems risky.
>
>
> http://reviews.llvm.org/D20724
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160527/ff81ae43/attachment.html>


More information about the llvm-commits mailing list