[HIP] Support -emit-llvm for device compilation
authorYaxun Liu <Yaxun.Liu@amd.com>
Thu, 3 Oct 2019 03:27:43 +0000 (03:27 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Thu, 3 Oct 2019 03:27:43 +0000 (03:27 +0000)
commitf13b8d4fe962216cd0e1a7dc318709caa1c5b59a
tree31bfb869a939aff96678cc1700d1462bfc31d354
parentf849f414699af50023bec96ab4e8f9d2af14bd63
[HIP] Support -emit-llvm for device compilation

Sometimes it is useful to compile HIP device code to LLVM BC. It is not convenient to use clang -cc1 since
there are lots of options needed.

This patch allows clang driver to compile HIP device code to LLVM BC with -emit-llvm -c.

Differential Revision: https://reviews.llvm.org/D68284

llvm-svn: 373561
clang/lib/Driver/Driver.cpp
clang/test/Driver/hip-device-compile.hip [new file with mode: 0644]