[llvm] r320947 - use uint32_t

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 17 11:00:53 PST 2017


If that struct corresponds to an on-disk file format, you probably should
use ulittle32_t instead of uint32_t so that you can read/create correct
wasm files on big-endian machines.

On Sun, Dec 17, 2017 at 9:50 AM, Sam Clegg via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: sbc
> Date: Sun Dec 17 09:50:07 2017
> New Revision: 320947
>
> URL: http://llvm.org/viewvc/llvm-project?rev=320947&view=rev
> Log:
> use uint32_t
>
> Modified:
>     llvm/trunk/include/llvm/BinaryFormat/Wasm.h
>
> Modified: llvm/trunk/include/llvm/BinaryFormat/Wasm.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/
> llvm/BinaryFormat/Wasm.h?rev=320947&r1=320946&r2=320947&view=diff
> ============================================================
> ==================
> --- llvm/trunk/include/llvm/BinaryFormat/Wasm.h (original)
> +++ llvm/trunk/include/llvm/BinaryFormat/Wasm.h Sun Dec 17 09:50:07 2017
> @@ -91,8 +91,8 @@ struct WasmLocalDecl {
>  struct WasmFunction {
>    std::vector<WasmLocalDecl> Locals;
>    ArrayRef<uint8_t> Body;
> -  size_t CodeSectionOffset;
> -  size_t Size;
> +  uint32_t CodeSectionOffset;
> +  uint32_t Size;
>  };
>
>  struct WasmDataSegment {
>
>
> _______________________________________________
> 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/20171217/0bc38830/attachment.html>


More information about the llvm-commits mailing list