llvm.org GIT mirror llvm / bde17ff
[WebAssembly] Fix build error in wasm YAML code This warning didn't show up on my local build but is causing the bots to fail. Seems like a bad idea to have types and variables with the same name anyhow. Differential Revision: https://reviews.llvm.org/D33022 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302606 91177308-0d34-0410-b5e6-96231b3b80d8 Sam Clegg 3 years ago
4 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
6868 ExportKind Kind;
6969 union {
7070 uint32_t SigIndex;
71 Global Global;
72 Table Table;
71 Global GlobalImport;
72 Table TableImport;
7373 Limits Memory;
7474 };
7575 };
264264 if (Import.Kind == wasm::WASM_EXTERNAL_FUNCTION) {
265265 IO.mapRequired("SigIndex", Import.SigIndex);
266266 } else if (Import.Kind == wasm::WASM_EXTERNAL_GLOBAL) {
267 IO.mapRequired("GlobalType", Import.Global.Type);
268 IO.mapRequired("GlobalMutable", Import.Global.Mutable);
267 IO.mapRequired("GlobalType", Import.GlobalImport.Type);
268 IO.mapRequired("GlobalMutable", Import.GlobalImport.Mutable);
269269 } else if (Import.Kind == wasm::WASM_EXTERNAL_TABLE) {
270 IO.mapRequired("Table", Import.Table);
270 IO.mapRequired("Table", Import.TableImport);
271271 } else if (Import.Kind == wasm::WASM_EXTERNAL_MEMORY ) {
272272 IO.mapRequired("Memory", Import.Memory);
273273 } else {
107107 Im.SigIndex = Import.SigIndex;
108108 break;
109109 case wasm::WASM_EXTERNAL_GLOBAL:
110 Im.Global.Type = Import.Global.Type;
111 Im.Global.Mutable = Import.Global.Mutable;
110 Im.GlobalImport.Type = Import.Global.Type;
111 Im.GlobalImport.Mutable = Import.Global.Mutable;
112112 break;
113113 case wasm::WASM_EXTERNAL_TABLE:
114 Im.Table = make_table(Import.Table);
114 Im.TableImport = make_table(Import.Table);
115115 break;
116116 case wasm::WASM_EXTERNAL_MEMORY:
117117 Im.Memory = make_limits(Import.Memory);
168168 encodeULEB128(Import.SigIndex, OS);
169169 break;
170170 case wasm::WASM_EXTERNAL_GLOBAL:
171 encodeSLEB128(Import.Global.Type, OS);
172 writeUint8(OS, Import.Global.Mutable);
171 encodeSLEB128(Import.GlobalImport.Type, OS);
172 writeUint8(OS, Import.GlobalImport.Mutable);
173173 break;
174174 case wasm::WASM_EXTERNAL_MEMORY:
175175 writeLimits(Import.Memory, OS);
176176 break;
177177 case wasm::WASM_EXTERNAL_TABLE:
178 encodeSLEB128(Import.Table.ElemType, OS);
179 writeLimits(Import.Table.TableLimits, OS);
178 encodeSLEB128(Import.TableImport.ElemType, OS);
179 writeLimits(Import.TableImport.TableLimits, OS);
180180 break;
181181 default:
182182 errs() << "Unknown import type: " << Import.Kind;