[PATCH] D44301: [WebAssembly] Add missing --demangle and --initial/max-memory args

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 10 08:16:23 PST 2018


ncw added inline comments.


================
Comment at: wasm/Writer.cpp:120
   uint32_t NumMemoryPages = 0;
+  uint32_t MaxMemoryPages = UINT32_MAX;
 
----------------
sbc100 wrote:
> I'm OK with 0 meaning no max.  Especially if i means you can avoid adding an duplicate getInteger helper for options?
> 
> TBH, I'm torn about weather to just remove this option though.  Do you know of any users who what to set a max? 
Oh - a further thought on zero. I remember now why I didn't do that, it's because for both Initial and Max is it possible to have zero as a legal value? Can a module not use the memory at all? I'm not sure we currently support it, but one day we might do. Zero does have a real "semantic" meaning for maximum, which is the opposite of "no maximum", whereas UINT32_MAX has a "semantic" meaning that exactly matches "no maximum".


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44301





More information about the llvm-commits mailing list