summaryrefslogtreecommitdiffstats
path: root/lib/ObjectYAML
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-04-25 17:11:56 +0000
committerSam Clegg <sbc@chromium.org>2017-04-25 17:11:56 +0000
commit2854ea835f72ca6adceeb66fdbe5432175c3ec69 (patch)
tree9d9dbd64bfff4d67a4d17d293d0678e35067d48e /lib/ObjectYAML
parentb3518390c199198cece243575d6ea3dca01090cf (diff)
[WebAssembly] Read global index in init expression as LEB
Subscribers: jfb, dschuff Differential Revision: https://reviews.llvm.org/D32462 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ObjectYAML')
-rw-r--r--lib/ObjectYAML/WasmYAML.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ObjectYAML/WasmYAML.cpp b/lib/ObjectYAML/WasmYAML.cpp
index 3e1bed19d61f..1c7c07ae29e8 100644
--- a/lib/ObjectYAML/WasmYAML.cpp
+++ b/lib/ObjectYAML/WasmYAML.cpp
@@ -294,6 +294,9 @@ void MappingTraits<wasm::WasmInitExpr>::mapping(IO &IO,
case wasm::WASM_OPCODE_F64_CONST:
IO.mapRequired("Value", Expr.Value.Float64);
break;
+ case wasm::WASM_OPCODE_GET_GLOBAL:
+ IO.mapRequired("Index", Expr.Value.Global);
+ break;
}
}