[PATCH] D70930: [llvm-objcopy][WebAssembly] Initial support for wasm in llvm-objcopy

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 01:39:32 PST 2019


jhenderson added a comment.

Only one small pair of questions from me, though absolutely others should approve this too.



================
Comment at: llvm/tools/llvm-objcopy/wasm/Writer.cpp:35
+      SectionSize += getULEB128Size(S.Name.size()) + S.Name.size();
+    encodeULEB128(SectionSize, OS, 5);
+    if (HasName) {
----------------
dschuff wrote:
> jhenderson wrote:
> > What is  the `5` here? Is there a constant for it somewhere if applicable?
> No constant (it's just the max encoded LEB size that can encode 32 bits) but added a comment.
Okay, thanks. Why 32-bit though? Also, do we need to handle data that is greater in size than max 32-bits in some way?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70930





More information about the llvm-commits mailing list