[PATCH] D32833: [Triple] Add method for triple canonicalization

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 12:59:41 PDT 2017


phosek added a comment.

In https://reviews.llvm.org/D32833#747114, @rengolin wrote:

> Also, where would this be used?


The plan was to use this in https://reviews.llvm.org/D32613 in the `getTargetDir` function to ensure that we always get the same path, no matter whether the user specified the target as `<arch>-fuchsia` or `<arch>-unknown-fuchsia`. I can do that transformation in the Fuchsia driver, but there are some other drivers where this might be useful, e.g. https://reviews.llvm.org/diffusion/L/browse/cfe/trunk/lib/Driver/ToolChains/CloudABI.cpp;302457$109, but maybe it'd be better to just put a utility method into a `ToolChain` class?


Repository:
  rL LLVM

https://reviews.llvm.org/D32833





More information about the llvm-commits mailing list