summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/BinaryFormat/Wasm.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-01-09 21:38:53 +0000
committerSam Clegg <sbc@chromium.org>2018-01-09 21:38:53 +0000
commite53af7f6df2cabaa62516e32ae00aaf271258fa4 (patch)
treedac521f63a63655bedd0ea9cb27429a8943ea6cb /llvm/include/llvm/BinaryFormat/Wasm.h
parentd68fa1be57ae66236af53f7a16e78309d2aecdea (diff)
downloadbcm5719-llvm-e53af7f6df2cabaa62516e32ae00aaf271258fa4.tar.gz
bcm5719-llvm-e53af7f6df2cabaa62516e32ae00aaf271258fa4.zip
[WebAssembly] Explicitly specify function/global index space in YAML
These indexes are useful because they are not always zero based and functions and globals are referenced elsewhere by their index. This matches what we already do for the type index space. Differential Revision: https://reviews.llvm.org/D41877 llvm-svn: 322121
Diffstat (limited to 'llvm/include/llvm/BinaryFormat/Wasm.h')
-rw-r--r--llvm/include/llvm/BinaryFormat/Wasm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/include/llvm/BinaryFormat/Wasm.h b/llvm/include/llvm/BinaryFormat/Wasm.h
index 57a0b441821..7d436180f03 100644
--- a/llvm/include/llvm/BinaryFormat/Wasm.h
+++ b/llvm/include/llvm/BinaryFormat/Wasm.h
@@ -66,6 +66,7 @@ struct WasmInitExpr {
};
struct WasmGlobal {
+ uint32_t Index;
int32_t Type;
bool Mutable;
WasmInitExpr InitExpr;
@@ -89,6 +90,7 @@ struct WasmLocalDecl {
};
struct WasmFunction {
+ uint32_t Index;
std::vector<WasmLocalDecl> Locals;
ArrayRef<uint8_t> Body;
uint32_t CodeSectionOffset;
OpenPOWER on IntegriCloud