mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
[WebAssembly] Address review comments from r346248 [NFC]
llvm-svn: 346249
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user