xref: /aosp_15_r20/external/clang/test/CodeGenCUDA/alias.cu (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // REQUIRES: x86-registered-target
2*67e74705SXin Li // REQUIRES: nvptx-registered-target
3*67e74705SXin Li 
4*67e74705SXin Li // RUN: %clang_cc1 -fcuda-is-device -triple nvptx-nvidia-cuda -emit-llvm \
5*67e74705SXin Li // RUN:   -o - %s | FileCheck %s
6*67e74705SXin Li 
7*67e74705SXin Li #include "Inputs/cuda.h"
8*67e74705SXin Li 
9*67e74705SXin Li // Check that we don't generate an alias from "foo" to the mangled name for
10*67e74705SXin Li // ns::foo() -- nvptx doesn't support aliases.
11*67e74705SXin Li 
12*67e74705SXin Li namespace ns {
13*67e74705SXin Li extern "C" {
14*67e74705SXin Li // CHECK-NOT: @foo = internal alias
foo()15*67e74705SXin Li __device__ __attribute__((used)) static int foo() { return 0; }
16*67e74705SXin Li }
17*67e74705SXin Li }
18