alias.cu 599 B

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