[WebAssembly] Implement --print-gc-sections for synthetic functions
Enables cleaning up confusion between which name variables are mangled
and which are unmangled, and --print-gc-sections then excersises and
tests that.
Differential Revision: https://reviews.llvm.org/D44440
llvm-svn: 330449
diff --git a/lld/wasm/MarkLive.cpp b/lld/wasm/MarkLive.cpp
index 9b72697..38ffbcb 100644
--- a/lld/wasm/MarkLive.cpp
+++ b/lld/wasm/MarkLive.cpp
@@ -105,5 +105,8 @@
if (!C->Live)
message("removing unused section " + toString(C));
}
+ for (InputChunk *C : Symtab->SyntheticFunctions)
+ if (!C->Live)
+ message("removing unused section " + toString(C));
}
}