forked from OSchip/llvm-project
04caa7c3e0
Recently we added diagnosing ODR-use of host variables in device functions, which includes ODR-use of const host variables since they are not really emitted on device side. This caused regressions since we used to allow ODR-use of const host variables in device functions. This patch allows ODR-use of const variables in device functions if the const variables can be statically initialized and have an empty dtor. Such variables are marked with implicit constant attrs and emitted on device side. This is in line with what clang does for constexpr variables. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D103108 |
||
---|---|---|
.. | ||
Inputs | ||
add-inline-in-definition.cu | ||
addr-of-overloaded-fn.cu | ||
alias.cu | ||
amdgpu-attrs.cu | ||
amdgpu-f128.cu | ||
amdgpu-size_t.cu | ||
amdgpu-windows-vectorcall.cu | ||
asm-constraints-device.cu | ||
asm-constraints-mixed.cu | ||
asm_delayed_diags.cu | ||
attr-declspec.cu | ||
attributes-on-non-cuda.cu | ||
autoret-global.cu | ||
bad-attributes.cu | ||
bad-calls-on-same-line.cu | ||
builtin-mangled-name.cu | ||
builtins.cu | ||
call-device-fn-from-host.cu | ||
call-host-fn-from-device.cu | ||
call-kernel-from-kernel.cu | ||
call-stack-for-deferred-err.cu | ||
config-type.cu | ||
constexpr-ctor.cu | ||
constexpr-variables.cu | ||
cuda-builtin-vars.cu | ||
cuda-inherits-calling-conv.cu | ||
cxx11-kernel-call.cu | ||
default-ctor.cu | ||
deferred-diags-limit.cu | ||
deferred-diags.cu | ||
deferred-oeverload.cu | ||
dependent-device-var.cu | ||
device-use-host-var.cu | ||
device-var-init.cu | ||
error-includes-mode.cu | ||
exceptions.cu | ||
extern-shared.cu | ||
float16.cu | ||
function-overload.cu | ||
function-target.cu | ||
function-template-overload.cu | ||
global-initializers-host.cu | ||
gnu-inline.cu | ||
host-device-constexpr.cu | ||
implicit-copy.cu | ||
implicit-device-lambda.cu | ||
implicit-intrinsic.cu | ||
implicit-member-target-collision-cxx11.cu | ||
implicit-member-target-collision.cu | ||
implicit-member-target-inherited.cu | ||
implicit-member-target.cu | ||
inherited-ctor.cu | ||
kernel-call.cu | ||
lambda.cu | ||
launch_bounds.cu | ||
lit.local.cfg | ||
managed-var.cu | ||
method-target.cu | ||
no-call-stack-for-immediate-errs.cu | ||
no-destructor-overload.cu | ||
no-host-device-constexpr.cu | ||
openmp-static-func.cu | ||
openmp-target.cu | ||
overloaded-delete.cu | ||
pr27778.cu | ||
qualifiers.cu | ||
reference-to-kernel-fn.cu | ||
static-device-var.cu | ||
trace-through-global.cu | ||
union-init.cu | ||
usual-deallocators.cu | ||
vararg.cu | ||
vla.cu |