forked from OSchip/llvm-project
[WebAssembly] Address review comments from r346248 [NFC]
llvm-svn: 346249
This commit is contained in:
parent
3bea8bcae5
commit
786760a9f6
|
@ -155,9 +155,8 @@ void Writer::createImportSection() {
|
|||
Import.Memory.Flags |= WASM_LIMITS_FLAG_HAS_MAX;
|
||||
Import.Memory.Maximum = MaxMemoryPages;
|
||||
}
|
||||
if (Config->SharedMemory) {
|
||||
if (Config->SharedMemory)
|
||||
Import.Memory.Flags |= WASM_LIMITS_FLAG_IS_SHARED;
|
||||
}
|
||||
writeImport(OS, Import);
|
||||
}
|
||||
|
||||
|
@ -217,7 +216,9 @@ void Writer::createMemorySection() {
|
|||
|
||||
bool HasMax = MaxMemoryPages != 0;
|
||||
writeUleb128(OS, 1, "memory count");
|
||||
unsigned Flags = HasMax ? static_cast<unsigned>(WASM_LIMITS_FLAG_HAS_MAX) : 0;
|
||||
unsigned Flags = 0;
|
||||
if (HasMax)
|
||||
Flags |= WASM_LIMITS_FLAG_HAS_MAX;
|
||||
if (Config->SharedMemory)
|
||||
Flags |= WASM_LIMITS_FLAG_IS_SHARED;
|
||||
writeUleb128(OS, Flags, "memory limits flags");
|
||||
|
|
Loading…
Reference in New Issue