[llvm] fd0964a - [WebAssembly] fix gcc 10 warning
Wouter van Oortmerssen via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 17:56:05 PDT 2020
Author: Wouter van Oortmerssen
Date: 2020-07-07T17:55:37-07:00
New Revision: fd0964ae8340d24ce7991767fbbfe4bc01af87b3
URL: https://github.com/llvm/llvm-project/commit/fd0964ae8340d24ce7991767fbbfe4bc01af87b3
DIFF: https://github.com/llvm/llvm-project/commit/fd0964ae8340d24ce7991767fbbfe4bc01af87b3.diff
LOG: [WebAssembly] fix gcc 10 warning
Added:
Modified:
llvm/include/llvm/BinaryFormat/Wasm.h
llvm/lib/MC/WasmObjectWriter.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/BinaryFormat/Wasm.h b/llvm/include/llvm/BinaryFormat/Wasm.h
index d8d72cacf226..1aca692e30a7 100644
--- a/llvm/include/llvm/BinaryFormat/Wasm.h
+++ b/llvm/include/llvm/BinaryFormat/Wasm.h
@@ -280,6 +280,7 @@ enum : unsigned {
};
enum : unsigned {
+ WASM_LIMITS_FLAG_NONE = 0x0,
WASM_LIMITS_FLAG_HAS_MAX = 0x1,
WASM_LIMITS_FLAG_IS_SHARED = 0x2,
WASM_LIMITS_FLAG_IS_64 = 0x4,
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index d1290b050ef2..f51d908c53e1 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -1198,7 +1198,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &Asm,
MemImport.Module = "env";
MemImport.Field = "__linear_memory";
MemImport.Kind = wasm::WASM_EXTERNAL_MEMORY;
- MemImport.Memory.Flags = is64Bit() ? wasm::WASM_LIMITS_FLAG_IS_64 : 0;
+ MemImport.Memory.Flags = is64Bit() ? wasm::WASM_LIMITS_FLAG_IS_64
+ : wasm::WASM_LIMITS_FLAG_NONE;
Imports.push_back(MemImport);
// For now, always emit the table section, since indirect calls are not
More information about the llvm-commits
mailing list