2016-01-26 06:36:37 +08:00
|
|
|
// REQUIRES: x86-registered-target
|
|
|
|
// REQUIRES: nvptx-registered-target
|
2018-03-29 22:50:00 +08:00
|
|
|
// REQUIRES: amdgpu-registered-target
|
2016-01-26 06:36:37 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -fcuda-is-device -triple nvptx-nvidia-cuda -emit-llvm \
|
|
|
|
// RUN: -o - %s | FileCheck %s
|
2018-03-29 22:50:00 +08:00
|
|
|
// RUN: %clang_cc1 -fcuda-is-device -triple amdgcn -emit-llvm \
|
|
|
|
// RUN: -o - %s | FileCheck %s
|
2016-01-26 06:36:37 +08:00
|
|
|
|
|
|
|
#include "Inputs/cuda.h"
|
|
|
|
|
|
|
|
// Check that we don't generate an alias from "foo" to the mangled name for
|
|
|
|
// ns::foo() -- nvptx doesn't support aliases.
|
|
|
|
|
|
|
|
namespace ns {
|
|
|
|
extern "C" {
|
|
|
|
// CHECK-NOT: @foo = internal alias
|
|
|
|
__device__ __attribute__((used)) static int foo() { return 0; }
|
|
|
|
}
|
|
|
|
}
|