[PATCH] D54379: Add Hurd toolchain support to Clang

Kristina Brooks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 16 02:00:42 PST 2018


kristina added inline comments.


================
Comment at: lib/Driver/Driver.cpp:418
+  replaceString(T, "-pc-gnu", "-pc-hurd-gnu");
+  TargetTriple = T;
+
----------------
kristina wrote:
> Reference to a local variable?
Hm, actually this is fine I guess, just avoid `strlen` and pass literals as StringRefs. I would make sure the triple actually matches before you construct a local though, otherwise you're forcing doing it for every target, which in majority of the cases isn't going to be Hurd. I would still use `SmallString` instead of `std::string` but that's more of a nitpick.


Repository:
  rC Clang

https://reviews.llvm.org/D54379





More information about the cfe-commits mailing list