[PATCH] D44311: [WebAssembly] Implement -print-gc-sections to test global GC

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 13 10:18:57 PDT 2018


ncw added inline comments.


================
Comment at: wasm/InputGlobal.h:55
+  return (toString(G->File) + ":(" + G->getName() + ")").str();
+}
+
----------------
sbc100 wrote:
> Non of this is needed if you don't include globals in the output of --print-gc-section.
True... but it's not a lot of code, and why would we support and test `--print-gc-section` for functions but not globals? I added it because otherwise the existing tests would look lopsided. It seems odd if the test has an assertion that does: "check that a function and a global were GC'd and the logging indicates that the function but not the global was GC'd".


================
Comment at: wasm/MarkLive.cpp:110
+      if (!C->Live)
+        message("removing unused section " + toString(C));
   }
----------------
sbc100 wrote:
> Can you make this a separate change?
Done, sorry, it's pulled out now.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44311





More information about the llvm-commits mailing list