[WebAssembly] Rename WasmLimits::Initial to ::Minimum.  NFC.

This patch renames the "Initial" member of WasmLimits to the name used
in the spec, "Minimum".

In the core WebAssembly specification, the Limits data type has one
required "min" member and one optional "max" member, indicating the
minimum required size of the corresponding table or memory, and the
maximum size, if any.

Although the WebAssembly spec does instantiate locally-defined tables
and memories with the initial size being equal to the minimum size, it
can't impose such a requirement for imports.  It doesn't make sense to
require an initial size for a memory import, for example.  The compiler
can only sensibly express the minimum and maximum sizes.

See
https://github.com/WebAssembly/js-types/blob/master/proposals/js-types/Overview.md#naming-of-size-limits
for a related discussion that agrees that the right name of "initial" is
"minimum" when querying the type of a table or memory from JavaScript.
(Of course it still makes sense for JS to speak in terms of an initial
size when it explicitly instantiates memories and tables.)

Differential Revision: https://reviews.llvm.org/D99186

GitOrigin-RevId: 9ac5620cb8548c0bd0150f0da68219dd3a5a657a
diff --git a/test/wasm/alias.s b/test/wasm/alias.s
index b2ab45e..0bb035b 100644
--- a/test/wasm/alias.s
+++ b/test/wasm/alias.s
@@ -24,7 +24,7 @@
 # CHECK-NEXT:     FunctionTypes:   [ 0 ]
 # CHECK-NEXT:   - Type:            MEMORY
 # CHECK-NEXT:     Memories:
-# CHECK-NEXT:       - Initial:         0x2
+# CHECK-NEXT:       - Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0
diff --git a/test/wasm/bsymbolic.s b/test/wasm/bsymbolic.s
index bc2e4e7..79c4a87 100644
--- a/test/wasm/bsymbolic.s
+++ b/test/wasm/bsymbolic.s
@@ -14,7 +14,7 @@
 // NOOPTION-NEXT:        Field:           memory
 // NOOPTION-NEXT:        Kind:            MEMORY
 // NOOPTION-NEXT:        Memory:
-// NOOPTION-NEXT:          Initial:         0x1
+// NOOPTION-NEXT:          Minimum:         0x1
 // NOOPTION-NEXT:      - Module:          env
 // NOOPTION-NEXT:        Field:           __memory_base
 // NOOPTION-NEXT:        Kind:            GLOBAL
@@ -56,7 +56,7 @@
 // SYMBOLIC-NEXT:        Field:           memory
 // SYMBOLIC-NEXT:        Kind:            MEMORY
 // SYMBOLIC-NEXT:        Memory:
-// SYMBOLIC-NEXT:          Initial:         0x1
+// SYMBOLIC-NEXT:          Minimum:         0x1
 // SYMBOLIC-NEXT:      - Module:          env
 // SYMBOLIC-NEXT:        Field:           __memory_base
 // SYMBOLIC-NEXT:        Kind:            GLOBAL
@@ -74,7 +74,7 @@
 // SYMBOLIC-NEXT:          Index:           0
 // SYMBOLIC-NEXT:          ElemType:        FUNCREF
 // SYMBOLIC-NEXT:          Limits:
-// SYMBOLIC-NEXT:            Initial:         0x1
+// SYMBOLIC-NEXT:            Minimum:         0x1
 // SYMBOLIC-NEXT:  - Type:            FUNCTION
 
 // SYMBOLIC:       - Type:            GLOBAL
diff --git a/test/wasm/call-indirect.ll b/test/wasm/call-indirect.ll
index f6d3df4..31e2c75 100644
--- a/test/wasm/call-indirect.ll
+++ b/test/wasm/call-indirect.ll
@@ -67,11 +67,11 @@
 ; CHECK-NEXT:         ElemType:        FUNCREF
 ; CHECK-NEXT:         Limits:
 ; CHECK-NEXT:           Flags:           [ HAS_MAX ]
-; CHECK-NEXT:           Initial:         0x3
+; CHECK-NEXT:           Minimum:         0x3
 ; CHECK-NEXT:           Maximum:         0x3
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x2
+; CHECK-NEXT:       - Minimum:         0x2
 ; CHECK-NEXT:   - Type:            GLOBAL
 ; CHECK-NEXT:     Globals:
 ; CHECK-NEXT:       - Index:           0
diff --git a/test/wasm/data-layout.s b/test/wasm/data-layout.s
index 72a859b..8399e9f 100644
--- a/test/wasm/data-layout.s
+++ b/test/wasm/data-layout.s
@@ -55,7 +55,7 @@
 # CHECK:        - Type:            MEMORY
 # CHECK-NEXT:     Memories:
 # CHK64-NEXT:       - Flags:           [ IS_64 ]
-# CHECK-NEXT:         Initial:         0x2
+# CHECK-NEXT:         Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0
@@ -104,7 +104,7 @@
 # CHECK-MAX:        - Type:            MEMORY
 # CHECK-MAX-NEXT:     Memories:
 # CHECK-MAX-NEXT:       - Flags:           [ HAS_MAX ]
-# CHECK-MAX-NEXT:         Initial:         0x2
+# CHECK-MAX-NEXT:         Minimum:         0x2
 # CHECK-MAX-NEXT:         Maximum:         0x2
 
 # RUN: wasm-ld -no-gc-sections --allow-undefined --no-entry --shared-memory \
@@ -115,7 +115,7 @@
 # CHECK-SHARED:        - Type:            MEMORY
 # CHECK-SHARED-NEXT:     Memories:
 # CHECK-SHARED-NEXT:       - Flags:           [ HAS_MAX, IS_SHARED ]
-# CHECK-SHARED-NEXT:         Initial:         0x2
+# CHECK-SHARED-NEXT:         Minimum:         0x2
 # CHECK-SHARED-NEXT:         Maximum:         0x2
 
 # XUN: wasm-ld --relocatable -o %t_reloc.wasm %t32.o %t.hello32.o
diff --git a/test/wasm/export-table-explicit.test b/test/wasm/export-table-explicit.test
index b6f03b9..58f0032 100644
--- a/test/wasm/export-table-explicit.test
+++ b/test/wasm/export-table-explicit.test
@@ -13,7 +13,7 @@
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:         0x1
 # CHECK-NEXT:           Maximum:         0x1
 # CHECK-NEXT:   - Type:
 
diff --git a/test/wasm/export-table.test b/test/wasm/export-table.test
index c0cb581..927ecce 100644
--- a/test/wasm/export-table.test
+++ b/test/wasm/export-table.test
@@ -10,7 +10,7 @@
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:         0x1
 # CHECK-NEXT:           Maximum:         0x1
 # CHECK-NEXT:   - Type:
 # CHECK:        - Type:            EXPORT
diff --git a/test/wasm/growable-table.test b/test/wasm/growable-table.test
index c5df1c3..675974e 100644
--- a/test/wasm/growable-table.test
+++ b/test/wasm/growable-table.test
@@ -9,7 +9,7 @@
 # CHECK-NEXT:       - Index:           0
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:       0x1
 # CHECK-NEXT:   - Type:
 # CHECK:        - Type:            EXPORT
 # CHECK-NEXT:     Exports:
diff --git a/test/wasm/import-memory.test b/test/wasm/import-memory.test
index e79775c..dd7066d 100644
--- a/test/wasm/import-memory.test
+++ b/test/wasm/import-memory.test
@@ -10,7 +10,7 @@
 # CHECK-NEXT:        Field:           memory
 # CHECK-NEXT:        Kind:            MEMORY
 # CHECK-NEXT:        Memory:
-# CHECK-NEXT:          Initial:         0x2
+# CHECK-NEXT:          Minimum:         0x2
 # CHECK-NEXT:  - Type:
 
 
@@ -28,7 +28,7 @@
 # CHECK-MAX-NEXT:        Kind:            MEMORY
 # CHECK-MAX-NEXT:        Memory:
 # CHECK-MAX-NEXT:          Flags:           [ HAS_MAX ]
-# CHECK-MAX-NEXT:          Initial:         0x4
+# CHECK-MAX-NEXT:          Minimum:         0x4
 # CHECK-MAX-NEXT:          Maximum:         0x5
 # CHECK-MAX-NEXT:  - Type:
 
@@ -45,6 +45,6 @@
 # CHECK-SHARED-NEXT:        Kind:            MEMORY
 # CHECK-SHARED-NEXT:        Memory:
 # CHECK-SHARED-NEXT:          Flags:           [ HAS_MAX, IS_SHARED ]
-# CHECK-SHARED-NEXT:          Initial:         0x4
+# CHECK-SHARED-NEXT:          Minimum:         0x4
 # CHECK-SHARED-NEXT:          Maximum:         0x5
 # CHECK-SHARED-NEXT:  - Type:
diff --git a/test/wasm/import-table.test b/test/wasm/import-table.test
index 088ff12..73dc718 100644
--- a/test/wasm/import-table.test
+++ b/test/wasm/import-table.test
@@ -21,5 +21,5 @@
 # CHECK-NEXT:          Index:           0
 # CHECK-NEXT:          ElemType:        FUNCREF
 # CHECK-NEXT:          Limits:
-# CHECK-NEXT:            Initial:         0x1
+# CHECK-NEXT:            Minimum:         0x1
 
diff --git a/test/wasm/large-memory.test b/test/wasm/large-memory.test
index b82c4af..5b737e4 100644
--- a/test/wasm/large-memory.test
+++ b/test/wasm/large-memory.test
@@ -12,7 +12,7 @@
 CHECK:      - Type:            MEMORY
 CHECK-NEXT:   Memories:
 CHECK-NEXT:     - Flags:           [ HAS_MAX ]
-CHECK-NEXT:       Initial:         0x2
+CHECK-NEXT:       Minimum:         0x2
 CHECK-2G-NEXT:    Maximum:         0x8000
 CHECK-4G-NEXT:    Maximum:         0x10000
 
diff --git a/test/wasm/local-symbols.ll b/test/wasm/local-symbols.ll
index 216aced..f504603 100644
--- a/test/wasm/local-symbols.ll
+++ b/test/wasm/local-symbols.ll
@@ -37,7 +37,7 @@
 ; CHECK-NEXT:     FunctionTypes:   [ 0, 1 ]
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x2
+; CHECK-NEXT:       - Minimum:         0x2
 ; CHECK-NEXT:   - Type:            GLOBAL
 ; CHECK-NEXT:     Globals:
 ; CHECK-NEXT:       - Index:           0
diff --git a/test/wasm/locals-duplicate.test b/test/wasm/locals-duplicate.test
index df76d2f..7de8ef1 100644
--- a/test/wasm/locals-duplicate.test
+++ b/test/wasm/locals-duplicate.test
@@ -22,11 +22,11 @@
 ; CHECK-NEXT:         ElemType:        FUNCREF
 ; CHECK-NEXT:         Limits:
 ; CHECK-NEXT:           Flags:           [ HAS_MAX ]
-; CHECK-NEXT:           Initial:         0x7
+; CHECK-NEXT:           Minimum:         0x7
 ; CHECK-NEXT:           Maximum:         0x7
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x2
+; CHECK-NEXT:       - Minimum:         0x2
 ; CHECK-NEXT:   - Type:            GLOBAL
 ; CHECK-NEXT:     Globals:
 ; CHECK-NEXT:       - Index:           0
@@ -240,13 +240,13 @@
 ; RELOC-NEXT:          Index:           0
 ; RELOC-NEXT:          ElemType:        FUNCREF
 ; RELOC-NEXT:          Limits:
-; RELOC-NEXT:            Initial:         0x7
+; RELOC-NEXT:            Minimum:         0x7
 ; RELOC-NEXT:   - Type:            FUNCTION
 ; RELOC-NEXT:     FunctionTypes:   [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 ; RELOC-NEXT:                        0, 0 ]
 ; RELOC-NEXT:   - Type:            MEMORY
 ; RELOC-NEXT:     Memories:
-; RELOC-NEXT:       - Initial:         0x1
+; RELOC-NEXT:       - Minimum:         0x1
 ; RELOC-NEXT:   - Type:            ELEM
 ; RELOC-NEXT:     Segments:
 ; RELOC-NEXT:       - Offset:
diff --git a/test/wasm/multi-table.s b/test/wasm/multi-table.s
index 2fdbf25..bf905ac 100644
--- a/test/wasm/multi-table.s
+++ b/test/wasm/multi-table.s
@@ -54,7 +54,7 @@
 # CHECK-NEXT:           Index:           0
 # CHECK-NEXT:           ElemType:        FUNCREF
 # CHECK-NEXT:           Limits:
-# CHECK-NEXT:             Initial:         0x0
+# CHECK-NEXT:             Minimum:         0x0
 # CHECK-NEXT:       - Module:          env
 # CHECK-NEXT:         Field:           foo
 # CHECK-NEXT:         Kind:            FUNCTION
@@ -66,20 +66,20 @@
 # CHECK-NEXT:       - Index:           1
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
-# CHECK-NEXT:           Initial:         0x0
+# CHECK-NEXT:           Minimum:         0x0
 # CHECK-NEXT:       - Index:           2
 # CHECK-NEXT:         ElemType:        EXTERNREF
 # CHECK-NEXT:         Limits:
-# CHECK-NEXT:           Initial:         0x0
+# CHECK-NEXT:           Minimum:         0x0
 # CHECK-NEXT:       - Index:           3
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x3
+# CHECK-NEXT:           Minimum:         0x3
 # CHECK-NEXT:           Maximum:         0x3
 # CHECK-NEXT:   - Type:            MEMORY
 # CHECK-NEXT:     Memories:
-# CHECK-NEXT:       - Initial:         0x2
+# CHECK-NEXT:       - Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0
diff --git a/test/wasm/pie.ll b/test/wasm/pie.ll
index 1aca4df..03e2c6c 100644
--- a/test/wasm/pie.ll
+++ b/test/wasm/pie.ll
@@ -62,7 +62,7 @@
 ; CHECK-NEXT:           Index:           0
 ; CHECK-NEXT:           ElemType:        FUNCREF
 ; CHECK-NEXT:           Limits:
-; CHECK-NEXT:             Initial:         0x1
+; CHECK-NEXT:             Minimum:         0x1
 
 ; CHECK:        - Type:            START
 ; CHECK-NEXT:     StartFunction:   2
diff --git a/test/wasm/relocatable.ll b/test/wasm/relocatable.ll
index b011813..c71a9c2 100644
--- a/test/wasm/relocatable.ll
+++ b/test/wasm/relocatable.ll
@@ -66,7 +66,7 @@
 ; CHECK-NEXT:           Index:           0
 ; CHECK-NEXT:           ElemType:        FUNCREF
 ; CHECK-NEXT:           Limits:
-; CHECK-NEXT:             Initial:         0x4
+; CHECK-NEXT:             Minimum:         0x4
 ; CHECK-NEXT:       - Module:          env
 ; CHECK-NEXT:         Field:           puts
 ; CHECK-NEXT:         Kind:            FUNCTION
@@ -83,7 +83,7 @@
 ; CHECK-NEXT:     FunctionTypes:   [ 2, 1, 1, 2 ]
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:      - Initial:         0x1
+; CHECK-NEXT:      - Minimum:         0x1
 ; CHECK-NEXT:   - Type:            ELEM
 ; CHECK-NEXT:     Segments:
 ; CHECK-NEXT:       - Offset:
diff --git a/test/wasm/responsefile.test b/test/wasm/responsefile.test
index 36209d4..4734517 100644
--- a/test/wasm/responsefile.test
+++ b/test/wasm/responsefile.test
@@ -3,7 +3,7 @@
 RUN: echo "%/t.o -o %/t.wasm -e ret32" > %t.rsp
 RUN: wasm-ld @%t.rsp --initial-memory=655360
 RUN: llvm-readobj --sections %t.wasm | FileCheck %s
-CHECK: InitialPages: 10
+CHECK: MinPages: 10
 
 RUN: not wasm-ld --rsp-quoting=foobar @%t.rsp 2>&1 | \
 RUN:     FileCheck --check-prefix=INVRSP %s
diff --git a/test/wasm/shared-memory-no-atomics.yaml b/test/wasm/shared-memory-no-atomics.yaml
index e303e39..942c690 100644
--- a/test/wasm/shared-memory-no-atomics.yaml
+++ b/test/wasm/shared-memory-no-atomics.yaml
@@ -14,7 +14,7 @@
         Field:           __linear_memory
         Kind:            MEMORY
         Memory:
-          Initial:         0x00000001
+          Minimum:         0x00000001
       - Module:          env
         Field:           __indirect_function_table
         Kind:            TABLE
@@ -22,7 +22,7 @@
           Index:           0
           ElemType:        FUNCREF
           Limits:
-            Initial:         0x00000000
+            Minimum:         0x00000000
   - Type:            DATA
     Segments:
       - SectionOffset:   6
@@ -55,7 +55,7 @@
 
 # NO-SHARED:      - Type:            MEMORY
 # NO-SHARED-NEXT:   Memories:
-# NO-SHARED-NEXT:     - Initial:         0x2
+# NO-SHARED-NEXT:     - Minimum:         0x2
 # NO-SHARED-NOT:        Maximum:
 
 # SHARED: --shared-memory is disallowed by {{.*}}shared-memory-no-atomics.yaml.tmp1.o because it was not compiled with 'atomics' or 'bulk-memory' features.
diff --git a/test/wasm/shared-memory.yaml b/test/wasm/shared-memory.yaml
index 8710a06..f10ac6a 100644
--- a/test/wasm/shared-memory.yaml
+++ b/test/wasm/shared-memory.yaml
@@ -22,7 +22,7 @@
         Field:           __linear_memory
         Kind:            MEMORY
         Memory:
-          Initial:         0x00000001
+          Minimum:         0x00000001
       - Module:          env
         Field:           __indirect_function_table
         Kind:            TABLE
@@ -30,7 +30,7 @@
           Index:           0
           ElemType:        FUNCREF
           Limits:
-            Initial:         0x00000000
+            Minimum:         0x00000000
   - Type:            DATA
     Segments:
       - SectionOffset:   6
@@ -64,11 +64,11 @@
 
 # ATOMICS-RELOCATABLE:        - Type:            MEMORY
 # ATOMICS-RELOCATABLE-NEXT:     Memories:
-# ATOMICS-RELOCATABLE-NEXT:         Initial:         0x1
+# ATOMICS-RELOCATABLE-NEXT:         Minimum:         0x1
 # ATOMICS-RELOCATABLE-NEXT:   - Type:
 
 # SHARED:        - Type:            MEMORY
 # SHARED-NEXT:     Memories:
 # SHARED-NEXT:       - Flags:           [ HAS_MAX, IS_SHARED ]
-# SHARED-NEXT:         Initial:         0x2
+# SHARED-NEXT:         Minimum:         0x2
 # SHARED-NEXT:         Maximum:         0x2
diff --git a/test/wasm/shared.ll b/test/wasm/shared.ll
index ecfc0e3..5cf49fb 100644
--- a/test/wasm/shared.ll
+++ b/test/wasm/shared.ll
@@ -67,7 +67,7 @@
 ; CHECK-NEXT:         Field:           memory
 ; CHECK-NEXT:         Kind:            MEMORY
 ; CHECK-NEXT:         Memory:
-; CHECK-NEXT:           Initial:       0x1
+; CHECK-NEXT:           Minimum:       0x1
 ; CHECK-NEXT:       - Module:          env
 ; CHECK-NEXT:         Field:           __indirect_function_table
 ; CHECK-NEXT:         Kind:            TABLE
@@ -75,7 +75,7 @@
 ; CHECK-NEXT:           Index:           0
 ; CHECK-NEXT:           ElemType:        FUNCREF
 ; CHECK-NEXT:           Limits:
-; CHECK-NEXT:             Initial:         0x2
+; CHECK-NEXT:             Minimum:         0x2
 ; CHECK-NEXT:       - Module:          env
 ; CHECK-NEXT:         Field:           __stack_pointer
 ; CHECK-NEXT:         Kind:            GLOBAL
diff --git a/test/wasm/stack-pointer.ll b/test/wasm/stack-pointer.ll
index 11ab62f..38693d2 100644
--- a/test/wasm/stack-pointer.ll
+++ b/test/wasm/stack-pointer.ll
@@ -32,7 +32,7 @@
 ; CHECK-NEXT:     FunctionTypes:   [ 0 ]
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x0
+; CHECK-NEXT:       - Minimum:         0x0
 ; CHECK-NEXT:   - Type:            CODE
 ; CHECK-NEXT:     Relocations:
 ; CHECK-NEXT:       - Type:            R_WASM_GLOBAL_INDEX_LEB
diff --git a/test/wasm/undefined-weak-call.s b/test/wasm/undefined-weak-call.s
index 0c8abcd..8f50173 100644
--- a/test/wasm/undefined-weak-call.s
+++ b/test/wasm/undefined-weak-call.s
@@ -56,11 +56,11 @@
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:         0x1
 # CHECK-NEXT:           Maximum:         0x1
 # CHECK-NEXT:   - Type:            MEMORY
 # CHECK-NEXT:     Memories:
-# CHECK-NEXT:       - Initial:         0x2
+# CHECK-NEXT:       - Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0
diff --git a/test/wasm/weak-alias-overide.ll b/test/wasm/weak-alias-overide.ll
index 4d47341..fcf2293 100644
--- a/test/wasm/weak-alias-overide.ll
+++ b/test/wasm/weak-alias-overide.ll
@@ -40,11 +40,11 @@
 ; CHECK-NEXT:         ElemType:        FUNCREF
 ; CHECK-NEXT:         Limits:
 ; CHECK-NEXT:           Flags:           [ HAS_MAX ]
-; CHECK-NEXT:           Initial:         0x3
+; CHECK-NEXT:           Minimum:         0x3
 ; CHECK-NEXT:           Maximum:         0x3
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x2
+; CHECK-NEXT:       - Minimum:         0x2
 ; CHECK-NEXT:   - Type:            GLOBAL
 ; CHECK-NEXT:     Globals:
 ; CHECK-NEXT:       - Index:           0
diff --git a/test/wasm/weak-alias.ll b/test/wasm/weak-alias.ll
index 8bdeda0..aa0a271 100644
--- a/test/wasm/weak-alias.ll
+++ b/test/wasm/weak-alias.ll
@@ -37,11 +37,11 @@
 ; CHECK-NEXT:         ElemType:        FUNCREF
 ; CHECK-NEXT:         Limits:
 ; CHECK-NEXT:           Flags:           [ HAS_MAX ]
-; CHECK-NEXT:           Initial:         0x2
+; CHECK-NEXT:           Minimum:         0x2
 ; CHECK-NEXT:           Maximum:         0x2
 ; CHECK-NEXT:   - Type:            MEMORY
 ; CHECK-NEXT:     Memories:
-; CHECK-NEXT:       - Initial:         0x2
+; CHECK-NEXT:       - Minimum:         0x2
 ; CHECK-NEXT:   - Type:            GLOBAL
 ; CHECK-NEXT:     Globals:
 ; CHECK-NEXT:       - Index:           0
@@ -151,7 +151,7 @@
 ; RELOC-NEXT:           Index:           0
 ; RELOC-NEXT:           ElemType:        FUNCREF
 ; RELOC-NEXT:           Limits:
-; RELOC-NEXT:             Initial:         0x2
+; RELOC-NEXT:             Minimum:         0x2
 ; RELOC-NEXT:       - Module:          env
 ; RELOC-NEXT:         Field:           __stack_pointer
 ; RELOC-NEXT:         Kind:            GLOBAL
@@ -161,7 +161,7 @@
 ; RELOC-NEXT:     FunctionTypes:   [ 0, 1, 1, 1, 1, 1 ]
 ; RELOC-NEXT:   - Type:            MEMORY
 ; RELOC-NEXT:     Memories:
-; RELOC-NEXT:       - Initial:         0x0
+; RELOC-NEXT:       - Minimum:         0x0
 ; RELOC-NEXT:   - Type:            ELEM
 ; RELOC-NEXT:     Segments:
 ; RELOC-NEXT:       - Offset:
diff --git a/test/wasm/weak-symbols.s b/test/wasm/weak-symbols.s
index 7557dfb..705b0b9 100644
--- a/test/wasm/weak-symbols.s
+++ b/test/wasm/weak-symbols.s
@@ -35,11 +35,11 @@
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x2
+# CHECK-NEXT:           Minimum:         0x2
 # CHECK-NEXT:           Maximum:         0x2
 # CHECK-NEXT:   - Type:            MEMORY
 # CHECK-NEXT:     Memories:
-# CHECK-NEXT:       - Initial:         0x2
+# CHECK-NEXT:       - Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0
diff --git a/test/wasm/weak-undefined.s b/test/wasm/weak-undefined.s
index e7abebb..44b0bc1 100644
--- a/test/wasm/weak-undefined.s
+++ b/test/wasm/weak-undefined.s
@@ -54,11 +54,11 @@
 # CHECK-NEXT:         ElemType:        FUNCREF
 # CHECK-NEXT:         Limits:
 # CHECK-NEXT:           Flags:           [ HAS_MAX ]
-# CHECK-NEXT:           Initial:         0x1
+# CHECK-NEXT:           Minimum:         0x1
 # CHECK-NEXT:           Maximum:         0x1
 # CHECK-NEXT:   - Type:            MEMORY
 # CHECK-NEXT:     Memories:
-# CHECK-NEXT:       - Initial:         0x2
+# CHECK-NEXT:       - Minimum:         0x2
 # CHECK-NEXT:   - Type:            GLOBAL
 # CHECK-NEXT:     Globals:
 # CHECK-NEXT:       - Index:           0
diff --git a/wasm/SyntheticSections.cpp b/wasm/SyntheticSections.cpp
index 6c83477..e4da8dc 100644
--- a/wasm/SyntheticSections.cpp
+++ b/wasm/SyntheticSections.cpp
@@ -131,7 +131,7 @@
     import.Field = "memory";
     import.Kind = WASM_EXTERNAL_MEMORY;
     import.Memory.Flags = 0;
-    import.Memory.Initial = out.memorySec->numMemoryPages;
+    import.Memory.Minimum = out.memorySec->numMemoryPages;
     if (out.memorySec->maxMemoryPages != 0 || config->sharedMemory) {
       import.Memory.Flags |= WASM_LIMITS_FLAG_HAS_MAX;
       import.Memory.Maximum = out.memorySec->maxMemoryPages;
diff --git a/wasm/Writer.cpp b/wasm/Writer.cpp
index 63e3dac..3a7104e 100644
--- a/wasm/Writer.cpp
+++ b/wasm/Writer.cpp
@@ -752,7 +752,7 @@
   WasmLimits limits = {0, tableSize, 0};
   if (WasmSym::indirectFunctionTable->isDefined() && !config->growableTable) {
     limits.Flags |= WASM_LIMITS_FLAG_HAS_MAX;
-    limits.Maximum = limits.Initial;
+    limits.Maximum = limits.Minimum;
   }
   WasmSym::indirectFunctionTable->setLimits(limits);
 }
diff --git a/wasm/WriterUtils.cpp b/wasm/WriterUtils.cpp
index 88e89df..1870b36 100644
--- a/wasm/WriterUtils.cpp
+++ b/wasm/WriterUtils.cpp
@@ -67,7 +67,7 @@
 static std::string toString(const llvm::wasm::WasmLimits &limits) {
   std::string ret;
   ret += "flags=0x" + std::to_string(limits.Flags);
-  ret += "; initial=" + std::to_string(limits.Initial);
+  ret += "; min=" + std::to_string(limits.Minimum);
   if (limits.Flags & WASM_LIMITS_FLAG_HAS_MAX)
     ret += "; max=" + std::to_string(limits.Maximum);
   return ret;
@@ -191,7 +191,7 @@
 
 void writeLimits(raw_ostream &os, const WasmLimits &limits) {
   writeU8(os, limits.Flags, "limits flags");
-  writeUleb128(os, limits.Initial, "limits initial");
+  writeUleb128(os, limits.Minimum, "limits min");
   if (limits.Flags & WASM_LIMITS_FLAG_HAS_MAX)
     writeUleb128(os, limits.Maximum, "limits max");
 }