[WebAssembly] Make tag attribute's encoding uint8
authorHeejin Ahn <aheejin@gmail.com>
Fri, 18 Jun 2021 21:41:01 +0000 (14:41 -0700)
committerHeejin Ahn <aheejin@gmail.com>
Tue, 22 Jun 2021 04:22:39 +0000 (21:22 -0700)
commit1c7b84108861ac92fb353891e7e4c747b6ea9f28
tree1421f7904d96d59d8e032dc2fa4208555ed2f792
parentbff2b9adbc8de23aeaa654c5957624078ddf8fe9
[WebAssembly] Make tag attribute's encoding uint8

This changes the encoding of the `attribute` field, which currently only
contains the value `0` denoting this tag is for an exception, from
`varuint32` to `uint8`. This field is effectively unused at the moment
and reserved for future use, and it is not likely to need `varuint32`
even in future.
See https://github.com/WebAssembly/exception-handling/pull/162.

This does not change any encoded binaries because `0` is encoded in the
same way both in `varuint32` and `uint8`.

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D104571
llvm/include/llvm/BinaryFormat/Wasm.h
llvm/lib/MC/WasmObjectWriter.cpp
llvm/lib/Object/WasmObjectFile.cpp