diff options
author | Justin Lebar <jlebar@google.com> | 2016-01-25 22:36:37 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-01-25 22:36:37 +0000 |
commit | cd2f6bbd5c12972328f006a07353995b269dad44 (patch) | |
tree | 049b6aa2d20d33a789f3fce8cf5bdb4654581aa0 /clang/test/CodeGenCUDA | |
parent | 710a35f1c7c9cdbc532fe63fc145e747049505f2 (diff) | |
download | bcm5719-llvm-cd2f6bbd5c12972328f006a07353995b269dad44.tar.gz bcm5719-llvm-cd2f6bbd5c12972328f006a07353995b269dad44.zip |
[CUDA] Don't generate aliases for static extern "C" functions.
Summary:
These aliases are done to support inline asm, but there's nothing we can
do: NVPTX doesn't support aliases.
Reviewers: tra
Subscribers: cfe-commits, jhen, echristo
Differential Revision: http://reviews.llvm.org/D16501
llvm-svn: 258734
Diffstat (limited to 'clang/test/CodeGenCUDA')
-rw-r--r-- | clang/test/CodeGenCUDA/alias.cu | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/CodeGenCUDA/alias.cu b/clang/test/CodeGenCUDA/alias.cu new file mode 100644 index 00000000000..6efff6b92aa --- /dev/null +++ b/clang/test/CodeGenCUDA/alias.cu @@ -0,0 +1,17 @@ +// REQUIRES: x86-registered-target +// REQUIRES: nvptx-registered-target + +// RUN: %clang_cc1 -fcuda-is-device -triple nvptx-nvidia-cuda -emit-llvm \ +// RUN: -o - %s | FileCheck %s + +#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; } +} +} |