[OpenMP] Accept shortened triples for -Xopenmp-target=
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 28 Jan 2022 18:28:28 +0000 (13:28 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Fri, 28 Jan 2022 23:22:17 +0000 (18:22 -0500)
commit24f88f57de588817bd21e799e2ac1069c025674c
tree7d0b4a83b0c77d38bd367a906ad08bb6f4aa1683
parentfad7e491a0770ac4336934030ac67d77e7af5520
[OpenMP] Accept shortened triples for -Xopenmp-target=

This patch builds on the change in D117634 that expanded the short
triples when passed in by the user. This patch adds the same
functionality for the `-Xopenmp-target=` flag. Previously it was
unintuitive that passing `-fopenmp-targets=nvptx64
-Xopenmp-target=nvptx64 <arg>` would not forward the arg because the
triples did not match on account of `nvptx64` being expanded to
`nvptx64-nvidia-cuda`.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D118495
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChain.cpp
clang/test/Driver/openmp-offload-gpu.c