[PATCH] D59743: [WebAssembly] Don't use default GetLinkerPath

Sam Clegg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 25 09:35:24 PDT 2019


sbc100 added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Fuchsia.h:89
 
-  const char *getDefaultLinker() const override {
-    return "ld.lld";
-  }
+  const char *getDefaultLinker() const override { return "ld.lld"; }
 
----------------
phosek wrote:
> This seems unrelated?
You're right.. I shouldn't have tried the sneak that past.  This change makes the output of "git grep getDefaultLinker" a lot more useful and confirms with the style guide so might still land it.


================
Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:57
+
+  return ToolChain.GetProgramPath("wasm-ld");
+}
----------------
phosek wrote:
> Nit: you could use `getDefaultLinker()` instead of hardcoding `wasm-ld` here so if the name ever changes you only need to change the getter.
Done. My rational for this was that since the function has exactly one call site (here) it made more sense to keep the information local to its use


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59743





More information about the cfe-commits mailing list