summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/BinaryFormat/Wasm.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-09-29 16:50:08 +0000
committerSam Clegg <sbc@chromium.org>2017-09-29 16:50:08 +0000
commit63ebb81386393c84d990e5e1bd52938eeb596f47 (patch)
tree95bacc2d0a9e8e1726c580decb1a2b55ccb65e8a /llvm/include/llvm/BinaryFormat/Wasm.h
parent113708b7cb30277a89a4b65d8ae4c8370b6b1841 (diff)
downloadbcm5719-llvm-63ebb81386393c84d990e5e1bd52938eeb596f47.tar.gz
bcm5719-llvm-63ebb81386393c84d990e5e1bd52938eeb596f47.zip
[WebAssembly] Allow each data segment to specify its own alignment
Also, add a flags field as we will almost certainly be needing that soon too. Differential Revision: https://reviews.llvm.org/D38296 llvm-svn: 314534
Diffstat (limited to 'llvm/include/llvm/BinaryFormat/Wasm.h')
-rw-r--r--llvm/include/llvm/BinaryFormat/Wasm.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/include/llvm/BinaryFormat/Wasm.h b/llvm/include/llvm/BinaryFormat/Wasm.h
index ffb453513cc..26475c27df3 100644
--- a/llvm/include/llvm/BinaryFormat/Wasm.h
+++ b/llvm/include/llvm/BinaryFormat/Wasm.h
@@ -98,6 +98,8 @@ struct WasmDataSegment {
WasmInitExpr Offset;
ArrayRef<uint8_t> Content;
StringRef Name;
+ uint32_t Alignment;
+ uint32_t Flags;
};
struct WasmElemSegment {
@@ -115,7 +117,6 @@ struct WasmRelocation {
struct WasmLinkingData {
uint32_t DataSize;
- uint32_t DataAlignment;
};
enum : unsigned {
@@ -185,7 +186,7 @@ enum : unsigned {
WASM_SYMBOL_INFO = 0x2,
WASM_DATA_SIZE = 0x3,
WASM_DATA_ALIGNMENT = 0x4,
- WASM_SEGMENT_NAMES = 0x5,
+ WASM_SEGMENT_INFO = 0x5,
};
const unsigned WASM_SYMBOL_BINDING_MASK = 0x3;
OpenPOWER on IntegriCloud