[lld] r348204 - [WebAssembly] Don't set a maximum size when importing the table
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 3 14:37:55 PST 2018
Author: sbc
Date: Mon Dec 3 14:37:55 2018
New Revision: 348204
URL: http://llvm.org/viewvc/llvm-project?rev=348204&view=rev
Log:
[WebAssembly] Don't set a maximum size when importing the table
We shouldn't be setting setting a max size for a table that is
being imported.
Differential Revision: https://reviews.llvm.org/D55231
Modified:
lld/trunk/test/wasm/import-table.test
lld/trunk/test/wasm/shared.ll
lld/trunk/wasm/Writer.cpp
Modified: lld/trunk/test/wasm/import-table.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/import-table.test?rev=348204&r1=348203&r2=348204&view=diff
==============================================================================
--- lld/trunk/test/wasm/import-table.test (original)
+++ lld/trunk/test/wasm/import-table.test Mon Dec 3 14:37:55 2018
@@ -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
Modified: lld/trunk/test/wasm/shared.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/shared.ll?rev=348204&r1=348203&r2=348204&view=diff
==============================================================================
--- lld/trunk/test/wasm/shared.ll (original)
+++ lld/trunk/test/wasm/shared.ll Mon Dec 3 14:37:55 2018
@@ -44,9 +44,7 @@ declare void @func_external()
; 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
Modified: lld/trunk/wasm/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Writer.cpp?rev=348204&r1=348203&r2=348204&view=diff
==============================================================================
--- lld/trunk/wasm/Writer.cpp (original)
+++ lld/trunk/wasm/Writer.cpp Mon Dec 3 14:37:55 2018
@@ -172,7 +172,7 @@ void Writer::createImportSection() {
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);
}
More information about the llvm-commits
mailing list