aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2018-11-06 17:27:25 +0000
committerDerek Schuff <dschuff@google.com>2018-11-06 17:27:25 +0000
commit6881806241ed994bf973fb3773ec05afbe3c71fb (patch)
tree185fd4572a4958244795399f1a85718ca4028290 /llvm/lib/Object/WasmObjectFile.cpp
parent724014addef9416cbc525b9be6ce7eda8e803834 (diff)
downloadllvm-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.cpp2
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);