[WebAssembly] Fix -Werror=extra failure due to enum in ternary

llvm-svn: 327579
This commit is contained in:
Nicholas Wilson 2018-03-14 21:43:04 +00:00
parent 0bc0859a00
commit ca5cc20e51
1 changed files with 2 additions and 1 deletions

View File

@ -194,7 +194,8 @@ void Writer::createMemorySection() {
bool HasMax = MaxMemoryPages != 0;
writeUleb128(OS, 1, "memory count");
writeUleb128(OS, HasMax ? WASM_LIMITS_FLAG_HAS_MAX : 0, "memory limits flags");
writeUleb128(OS, HasMax ? static_cast<unsigned>(WASM_LIMITS_FLAG_HAS_MAX) : 0,
"memory limits flags");
writeUleb128(OS, NumMemoryPages, "initial pages");
if (HasMax)
writeUleb128(OS, MaxMemoryPages, "max pages");