[PATCH] D42511: [WebAssembly] Add support for --gc-sections
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 10:27:51 PST 2018
ruiu added a comment.
Generally looking pretty good to me. A few minor comments.
================
Comment at: wasm/Driver.cpp:228
+// This functions implements --gc-sections, which is a feature to remove unused
+// chunks from the output. Unused chunks are those that are not reachable from
----------------
I would move this function to a new file MarkLive.cpp for consistency with other targets.
================
Comment at: wasm/Driver.cpp:280
+ case R_WEBASSEMBLY_TABLE_INDEX_SLEB:
+ Sym = Chunk.File->getFunctionSymbol(Reloc.Index);
+ break;
----------------
I'd call Enqueue directly here and below to eliminate a local variable `Sym`.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D42511
More information about the llvm-commits
mailing list