diff options
| author | Sam Clegg <sbc@chromium.org> | 2017-04-25 17:11:56 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2017-04-25 17:11:56 +0000 |
| commit | 7fb391fea3af9d4f0f970e2bf4b16cead76dc3b0 (patch) | |
| tree | 5bb70bfc7fa06cd0c4a1da7073dd6eecf93e5fff /llvm/lib/Object/WasmObjectFile.cpp | |
| parent | 0b650d35698d7a80352f3f4a67289b8b47df4726 (diff) | |
| download | bcm5719-llvm-7fb391fea3af9d4f0f970e2bf4b16cead76dc3b0.tar.gz bcm5719-llvm-7fb391fea3af9d4f0f970e2bf4b16cead76dc3b0.zip | |
[WebAssembly] Read global index in init expression as LEB
Subscribers: jfb, dschuff
Differential Revision: https://reviews.llvm.org/D32462
llvm-svn: 301330
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 5b254b2957a..e1b3c4e1f39 100644 --- a/llvm/lib/Object/WasmObjectFile.cpp +++ b/llvm/lib/Object/WasmObjectFile.cpp @@ -144,7 +144,7 @@ static Error readInitExpr(wasm::WasmInitExpr &Expr, const uint8_t *&Ptr) { Expr.Value.Float64 = readFloat64(Ptr); break; case wasm::WASM_OPCODE_GET_GLOBAL: - Expr.Value.Global = readUint32(Ptr); + Expr.Value.Global = readULEB128(Ptr); break; default: return make_error<GenericBinaryError>("Invalid opcode in init_expr", |

