Go to file
Justin Lebar ba122ab42f [CUDA] Make unattributed constexpr functions implicitly host+device.
With this patch, by a constexpr function is implicitly host+device
unless:

 a) it's a variadic function (variadic functions are not allowed on the
    device side), or
 b) it's preceeded by a __device__ overload in a system header.

The restriction on overloading __host__ __device__ functions on the
basis of their CUDA attributes remains in place, but we use (b) to allow
us to define __device__ overloads for constexpr functions in cmath,
which would otherwise be __host__ __device__ and thus not overloadable.

You can disable this behavior with -fno-cuda-host-device-constexpr.

Reviewers: tra, rnk, rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18380

llvm-svn: 264964
2016-03-30 23:30:21 +00:00
clang [CUDA] Make unattributed constexpr functions implicitly host+device. 2016-03-30 23:30:21 +00:00
clang-tools-extra Update copyright year to 2016. 2016-03-30 22:38:47 +00:00
compiler-rt Update copyright year to 2016. 2016-03-30 22:38:50 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Update copyright year to 2016. 2016-03-30 22:39:03 +00:00
libcxx Update copyright year to 2016. 2016-03-30 22:39:53 +00:00
libcxxabi Update copyright year to 2016. 2016-03-30 22:40:47 +00:00
libunwind [AArch64] Fix libunwind build when using GNU assembler 2016-02-11 21:22:57 +00:00
lld Fix MachO test which is failing on a Windows bot. 2016-03-30 23:28:49 +00:00
lldb Enhance the 'type X list' commands such that they actually alert the user if no formatters matching the constraints could be found 2016-03-30 22:45:13 +00:00
llgo [llgo] add USES_TERMINAL option to check-libgo 2016-03-30 00:29:33 +00:00
llvm CodeGen: Factor out code for tail call result compatibility check; NFC 2016-03-30 22:46:04 +00:00
openmp Fix bug when KMP_USE_ADAPTIVE_LOCKS is 0 2016-03-30 21:50:59 +00:00
polly Update copyright year to 2016. 2016-03-30 22:41:38 +00:00