diff options
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/WasmObjectWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index ead4f9e..985f9351 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -972,6 +972,8 @@ void WasmObjectWriter::writeTableSection(ArrayRef<wasm::WasmTable> Tables) { encodeULEB128(Tables.size(), W->OS); for (const wasm::WasmTable &Table : Tables) { + assert(Table.Type.ElemType != wasm::ValType::OTHERREF && + "Cannot encode general ref-typed tables"); encodeULEB128((uint32_t)Table.Type.ElemType, W->OS); encodeULEB128(Table.Type.Limits.Flags, W->OS); encodeULEB128(Table.Type.Limits.Minimum, W->OS); |