summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorAaron Enye Shi <enye.shi@gmail.com>2019-04-02 21:54:41 +0000
committerAaron Enye Shi <enye.shi@gmail.com>2019-04-02 21:54:41 +0000
commit6d37f326fc6971e4f83effb9e638c356b90a62ea (patch)
treec2e27fad5956fd73eb72129b66869c07d03ea19e /clang/lib/CodeGen
parent1754774369ac8bd5b0d1e0cc88adc4acba9d2666 (diff)
downloadbcm5719-llvm-6d37f326fc6971e4f83effb9e638c356b90a62ea.tar.gz
bcm5719-llvm-6d37f326fc6971e4f83effb9e638c356b90a62ea.zip
[HIP-Clang] Fat binary should not be produced for non GPU code
clang-format the changes to CUDA and HIP fat binary. Reviewers: yaxunl, tra Differential Revision: https://reviews.llvm.org/D60141 llvm-svn: 357532
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCUDANV.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCUDANV.cpp b/clang/lib/CodeGen/CGCUDANV.cpp
index 913d58e0178..42d2b15a4ee 100644
--- a/clang/lib/CodeGen/CGCUDANV.cpp
+++ b/clang/lib/CodeGen/CGCUDANV.cpp
@@ -473,8 +473,8 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() {
StringRef CudaGpuBinaryFileName = CGM.getCodeGenOpts().CudaGpuBinaryFileName;
if (CudaGpuBinaryFileName.empty() && !IsHIP)
return nullptr;
- if ( (IsHIP || (IsCUDA && !RelocatableDeviceCode) )
- && EmittedKernels.empty() && DeviceVars.empty())
+ if ((IsHIP || (IsCUDA && !RelocatableDeviceCode)) && EmittedKernels.empty() &&
+ DeviceVars.empty())
return nullptr;
// void __{cuda|hip}_register_globals(void* handle);
OpenPOWER on IntegriCloud