[lld] [llvm] [Object][Wasm] Move WasmSymbolInfo directly into WasmSymbol (NFC) (PR #80219)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 20:52:36 PST 2024


================
@@ -322,20 +322,20 @@ void ObjFile::addLegacyIndirectFunctionTableIfNeeded(
     return;
   }
 
-  auto *info = make<WasmSymbolInfo>();
-  info->Name = tableImport->Field;
-  info->Kind = WASM_SYMBOL_TYPE_TABLE;
-  info->ImportModule = tableImport->Module;
-  info->ImportName = tableImport->Field;
-  info->Flags = WASM_SYMBOL_UNDEFINED;
-  info->Flags |= WASM_SYMBOL_NO_STRIP;
-  info->ElementIndex = 0;
-  LLVM_DEBUG(dbgs() << "Synthesizing symbol for table import: " << info->Name
+  WasmSymbolInfo info;
+  info.Name = tableImport->Field;
+  info.Kind = WASM_SYMBOL_TYPE_TABLE;
+  info.ImportModule = tableImport->Module;
+  info.ImportName = tableImport->Field;
+  info.Flags = WASM_SYMBOL_UNDEFINED;
+  info.Flags |= WASM_SYMBOL_NO_STRIP;
----------------
sbc100 wrote:

Combine the above two lines?

https://github.com/llvm/llvm-project/pull/80219


More information about the llvm-commits mailing list