diff options
author | Sam Clegg <sbc@chromium.org> | 2018-01-31 19:50:14 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2018-01-31 19:50:14 +0000 |
commit | 6e7f1826c58932c0e987d8eca5b9055439161b13 (patch) | |
tree | 026cc7c2042402c331710cb6d709d92011b1c15b /llvm/include/llvm/BinaryFormat/Wasm.h | |
parent | f9edbe95db69e851c2bed712318f43b45de31ddd (diff) | |
download | bcm5719-llvm-6e7f1826c58932c0e987d8eca5b9055439161b13.tar.gz bcm5719-llvm-6e7f1826c58932c0e987d8eca5b9055439161b13.zip |
[WebAssembly] MC: Remove unused code for handling of wasm globals
For now, we are not using wasm globals, except for modeling of
the stack points.
Alos, factor out common struct WasmGlobalType, which matches the
name for that tuple in the Wasm spec and rename methods
to "isBindingGlobal", "isTypeGlobal" to avoid ambiguity.
Patch by Nicholas Wilson!
Differential Revision: https://reviews.llvm.org/D42750
llvm-svn: 323901
Diffstat (limited to 'llvm/include/llvm/BinaryFormat/Wasm.h')
-rw-r--r-- | llvm/include/llvm/BinaryFormat/Wasm.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/include/llvm/BinaryFormat/Wasm.h b/llvm/include/llvm/BinaryFormat/Wasm.h index d2ebe187cea..0e98b8e8f66 100644 --- a/llvm/include/llvm/BinaryFormat/Wasm.h +++ b/llvm/include/llvm/BinaryFormat/Wasm.h @@ -65,10 +65,14 @@ struct WasmInitExpr { } Value; }; -struct WasmGlobal { - uint32_t Index; +struct WasmGlobalType { int32_t Type; bool Mutable; +}; + +struct WasmGlobal { + uint32_t Index; + WasmGlobalType Type; WasmInitExpr InitExpr; }; @@ -78,7 +82,7 @@ struct WasmImport { uint32_t Kind; union { uint32_t SigIndex; - WasmGlobal Global; + WasmGlobalType Global; WasmTable Table; WasmLimits Memory; }; |