[PATCH] D55231: [WebAssembly] Don't set a maximum side when importing the table
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 3 12:27:26 PST 2018
sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff.
We shouldn't be setting setting a max size for a table that is
being imported.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D55231
Files:
test/wasm/import-table.test
test/wasm/shared.ll
wasm/Writer.cpp
Index: wasm/Writer.cpp
===================================================================
--- wasm/Writer.cpp
+++ wasm/Writer.cpp
@@ -172,7 +172,7 @@
Import.Field = kFunctionTableName;
Import.Kind = WASM_EXTERNAL_TABLE;
Import.Table.ElemType = WASM_TYPE_ANYFUNC;
- Import.Table.Limits = {WASM_LIMITS_FLAG_HAS_MAX, TableSize, TableSize};
+ Import.Table.Limits = {0, TableSize, 0};
writeImport(OS, Import);
}
Index: test/wasm/shared.ll
===================================================================
--- test/wasm/shared.ll
+++ test/wasm/shared.ll
@@ -44,9 +44,7 @@
; CHECK-NEXT: Table:
; CHECK-NEXT: ElemType: ANYFUNC
; CHECK-NEXT: Limits:
-; CHECK-NEXT: Flags: [ HAS_MAX ]
; CHECK-NEXT: Initial: 0x00000002
-; CHECK-NEXT: Maximum: 0x00000002
; CHECK-NEXT: - Module: env
; CHECK-NEXT: Field: __stack_pointer
; CHECK-NEXT: Kind: GLOBAL
Index: test/wasm/import-table.test
===================================================================
--- test/wasm/import-table.test
+++ test/wasm/import-table.test
@@ -12,7 +12,5 @@
# CHECK-NEXT: Table:
# CHECK-NEXT: ElemType: ANYFUNC
# CHECK-NEXT: Limits:
-# CHECK-NEXT: Flags: [ HAS_MAX ]
# CHECK-NEXT: Initial: 0x00000001
-# CHECK-NEXT: Maximum: 0x00000001
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55231.176451.patch
Type: text/x-patch
Size: 1486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181203/c14fc098/attachment.bin>
More information about the llvm-commits
mailing list