mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 22:36:06 +00:00

Summary: * -fcuda-target-overloads Previously unconditionally set to true by the driver. Necessary for correct functioning of the compiler -- our CUDA headers wrapper won't compile without this. * -fcuda-disable-target-call-checks Previously unconditionally set to true by the driver. Necessary to compile almost any external CUDA code -- almost all libraries assume that host+device code can call host or device functions. * -fcuda-allow-host-calls-from-host-device No effect when target overloading is enabled. Reviewers: tra Subscribers: rsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D18416 llvm-svn: 264739
12 lines
351 B
Plaintext
12 lines
351 B
Plaintext
// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device \
|
|
// RUN: -fsyntax-only -verify %s
|
|
|
|
#include "Inputs/cuda.h"
|
|
|
|
// expected-no-diagnostics
|
|
__device__ void __threadfence_system() {
|
|
// This shouldn't produce an error, since __nvvm_membar_sys should be
|
|
// __device__ and thus callable from device code.
|
|
__nvvm_membar_sys();
|
|
}
|