[PATCH] D78796: [Support] Refactor LEB128 encoding into an input iterator

Nicolas Guillemot via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 23:57:35 PDT 2020


nlguillemot added a comment.

The end goal of this series of patches is to support encoding/decoding `APInt` to/from `[U|S]LEB128`. This patch is an initial step in that direction. It refactors the logic to avoid code duplication and makes the interface to LEB128 encoding much more generic, as shown by the existing cases becoming very short.

In a later patch, I'd like to do some template magic to support `LEB128InputIterator<APInt>` in a way that tries to share code with the `uint64_t`/`int64_t` implementations.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78796/new/

https://reviews.llvm.org/D78796





More information about the llvm-commits mailing list