[PATCH] D47032: Support: Simplify endian stream interface. NFCI.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 13:19:55 PDT 2018


Note that the endianness values can be passed in to the llvm functions at
runtime, there are non template versions of the write functions that accept
endianness as arguments (that may be exactly what you used, btw, I didn’t
read the patch in detail).

It’s a shame this object hierarchy was developed separately from the
BinaryStream / StreamReader / StreamWriter interfaces, because it seems
like there’s some overlap and it would serve this use case nicely
On Fri, May 18, 2018 at 12:50 PM Peter Collingbourne via Phabricator via
llvm-commits <llvm-commits at lists.llvm.org> wrote:

> This revision was automatically updated to reflect the committed changes.
> Closed by commit rLLD332757: Support: Simplify endian stream interface.
> NFCI. (authored by pcc, committed by ).
>
> Changed prior to commit:
>   https://reviews.llvm.org/D47032?vs=147396&id=147573#toc
>
> Repository:
>   rLLD LLVM Linker
>
> https://reviews.llvm.org/D47032
>
> Files:
>   wasm/WriterUtils.cpp
>
>
> Index: wasm/WriterUtils.cpp
> ===================================================================
> --- wasm/WriterUtils.cpp
> +++ wasm/WriterUtils.cpp
> @@ -70,7 +70,7 @@
>
>  void wasm::writeU32(raw_ostream &OS, uint32_t Number, const Twine &Msg) {
>    debugWrite(OS.tell(), Msg + "[0x" + utohexstr(Number) + "]");
> -  support::endian::Writer<support::little>(OS).write(Number);
> +  support::endian::write(OS, Number, support::little);
>  }
>
>  void wasm::writeValueType(raw_ostream &OS, uint8_t Type, const Twine
> &Msg) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180518/6fe731cb/attachment.html>


More information about the llvm-commits mailing list