diff options
author | Derek Schuff <dschuff@google.com> | 2018-11-06 17:27:25 +0000 |
---|---|---|
committer | Derek Schuff <dschuff@google.com> | 2018-11-06 17:27:25 +0000 |
commit | 6881806241ed994bf973fb3773ec05afbe3c71fb (patch) | |
tree | 185fd4572a4958244795399f1a85718ca4028290 /llvm/lib/Object/WasmObjectFile.cpp | |
parent | 724014addef9416cbc525b9be6ce7eda8e803834 (diff) | |
download | llvm-6881806241ed994bf973fb3773ec05afbe3c71fb.zip llvm-6881806241ed994bf973fb3773ec05afbe3c71fb.tar.gz llvm-6881806241ed994bf973fb3773ec05afbe3c71fb.tar.bz2 |
[WebAssembly] Add shared memory support to limits field
Support the IS_SHARED bit in the memory limits flag word.
The compiler does not create object files with memory definitions,
but the field is used by the linker.
Differential Revision: https://reviews.llvm.org/D54131
llvm-svn: 346246
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/WasmObjectFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp index 75925a5..3bd66f9 100644 --- a/llvm/lib/Object/WasmObjectFile.cpp +++ b/llvm/lib/Object/WasmObjectFile.cpp @@ -193,7 +193,7 @@ static Error readInitExpr(wasm::WasmInitExpr &Expr, static wasm::WasmLimits readLimits(WasmObjectFile::ReadContext &Ctx) { wasm::WasmLimits Result; - Result.Flags = readVaruint1(Ctx); + Result.Flags = readVaruint32(Ctx); Result.Initial = readVaruint32(Ctx); if (Result.Flags & wasm::WASM_LIMITS_FLAG_HAS_MAX) Result.Maximum = readVaruint32(Ctx); |