[PATCH] D158799: [llvm-nm][WebAssembly] Report the size of data symbols

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 23:32:31 PDT 2023


jhenderson added a comment.

Makes sense to me, but perhaps one additional test case needed. I'll leave @dschuff to give final approval though.



================
Comment at: llvm/test/tools/llvm-nm/wasm/print-size.test:28
+
+# CHECK: 00000000 00000020 D a_symbol
----------------
Perhaps worth showing that a symbol that isn't in the data segment doesn't have a size printed too?


================
Comment at: llvm/tools/llvm-nm/llvm-nm.cpp:1822
+      if (const WasmObjectFile *WasmObj = dyn_cast<WasmObjectFile>(&Obj)) {
+        const WasmSymbol& WasmSym = WasmObj->getWasmSymbol(Sym);
+        if (WasmSym.isTypeData())
----------------
Nit: not clang-formatted.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158799/new/

https://reviews.llvm.org/D158799



More information about the llvm-commits mailing list