[hip] Fix device-only relocatable code compilation.
authorMichael Liao <michael.hliao@gmail.com>
Mon, 8 Jun 2020 19:37:06 +0000 (15:37 -0400)
committerMichael Liao <michael.hliao@gmail.com>
Wed, 10 Jun 2020 18:10:41 +0000 (14:10 -0400)
commit8b6821a5843bb321b3738e2519beae7142e62928
tree692903744f8ffab7484f3e547f23c58c2b5c37c2
parent4022bc2a6c5e585d99a76b1b2f14c2986b823ce9
[hip] Fix device-only relocatable code compilation.

Summary:
- In HIP, just as the regular device-only compilation, the device-only
  relocatable code compilation should not involve offload bundle.
- In addition, that device-only relocatable code compilation should have
  the similar 3 steps, namely preprocessor, compile, and backend, to the
  regular code generation with `-emit-llvm`.

Reviewers: yaxunl, tra

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81427
clang/lib/Driver/Driver.cpp
clang/test/Driver/hip-rdc-device-only.hip [new file with mode: 0644]