@@ -172,6 +172,9 @@ class Symbol {
172
172
bool isStub : 1 ;
173
173
174
174
uint32_t flags;
175
+
176
+ llvm::Optional<StringRef> importName;
177
+ llvm::Optional<StringRef> importModule;
175
178
};
176
179
177
180
class FunctionSymbol : public Symbol {
@@ -222,15 +225,15 @@ class UndefinedFunction : public FunctionSymbol {
222
225
const WasmSignature *type = nullptr ,
223
226
bool isCalledDirectly = true )
224
227
: FunctionSymbol(name, UndefinedFunctionKind, flags, file, type),
225
- importName (importName), importModule(importModule),
226
- isCalledDirectly(isCalledDirectly) {}
228
+ isCalledDirectly (isCalledDirectly) {
229
+ this ->importName = importName;
230
+ this ->importModule = importModule;
231
+ }
227
232
228
233
static bool classof (const Symbol *s) {
229
234
return s->kind () == UndefinedFunctionKind;
230
235
}
231
236
232
- llvm::Optional<StringRef> importName;
233
- llvm::Optional<StringRef> importModule;
234
237
DefinedFunction *stubFunction = nullptr ;
235
238
bool isCalledDirectly;
236
239
};
@@ -354,15 +357,14 @@ class UndefinedGlobal : public GlobalSymbol {
354
357
llvm::Optional<StringRef> importModule, uint32_t flags,
355
358
InputFile *file = nullptr ,
356
359
const WasmGlobalType *type = nullptr )
357
- : GlobalSymbol(name, UndefinedGlobalKind, flags, file, type),
358
- importName (importName), importModule(importModule) {}
360
+ : GlobalSymbol(name, UndefinedGlobalKind, flags, file, type) {
361
+ this ->importName = importName;
362
+ this ->importModule = importModule;
363
+ }
359
364
360
365
static bool classof (const Symbol *s) {
361
366
return s->kind () == UndefinedGlobalKind;
362
367
}
363
-
364
- llvm::Optional<StringRef> importName;
365
- llvm::Optional<StringRef> importModule;
366
368
};
367
369
368
370
class TableSymbol : public Symbol {
@@ -403,15 +405,14 @@ class UndefinedTable : public TableSymbol {
403
405
UndefinedTable (StringRef name, llvm::Optional<StringRef> importName,
404
406
llvm::Optional<StringRef> importModule, uint32_t flags,
405
407
InputFile *file, const WasmTableType *type)
406
- : TableSymbol(name, UndefinedTableKind, flags, file, type),
407
- importName (importName), importModule(importModule) {}
408
+ : TableSymbol(name, UndefinedTableKind, flags, file, type) {
409
+ this ->importName = importName;
410
+ this ->importModule = importModule;
411
+ }
408
412
409
413
static bool classof (const Symbol *s) {
410
414
return s->kind () == UndefinedTableKind;
411
415
}
412
-
413
- llvm::Optional<StringRef> importName;
414
- llvm::Optional<StringRef> importModule;
415
416
};
416
417
417
418
// A tag is a general format to distinguish typed entities. Each tag has an
0 commit comments