[PATCH] D54130: [WebAssembly] Support creation and import of shared memories
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 08:42:48 PST 2018
sbc100 accepted this revision.
sbc100 added a comment.
This revision is now accepted and ready to land.
Nice!
================
Comment at: wasm/Writer.cpp:160
+ Import.Memory.Flags |= WASM_LIMITS_FLAG_IS_SHARED;
+ }
writeImport(OS, Import);
----------------
No curly braces for single line blocks
================
Comment at: wasm/Writer.cpp:220
writeUleb128(OS, 1, "memory count");
- writeUleb128(OS, HasMax ? static_cast<unsigned>(WASM_LIMITS_FLAG_HAS_MAX) : 0,
- "memory limits flags");
+ unsigned Flags = HasMax ? static_cast<unsigned>(WASM_LIMITS_FLAG_HAS_MAX) : 0;
+ if (Config->SharedMemory)
----------------
For consistency maybe:
```
unsigned Flags = 0;
if (HasMax)
Flags |= WASM_LIMITS_FLAG_HAS_MAX;
```
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D54130
More information about the llvm-commits
mailing list