summaryrefslogtreecommitdiff
path: root/test/CodeGen/NVPTX/global-ctor-empty.ll
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-01-30 01:07:38 +0000
committerJustin Lebar <jlebar@google.com>2016-01-30 01:07:38 +0000
commitb31edea1847eed061473debbc0d0385e3fb9472b (patch)
tree27ee63f0f3a5025a2b43c15ce4983f429df5887c /test/CodeGen/NVPTX/global-ctor-empty.ll
parent41a66df74f2b7df77d7132e2d71b6df448015f59 (diff)
[CUDA] Die if we ask the NVPTX backend to emit a global ctor/dtor.
Summary: Previously we'd just silently skip these. Reviewers: tra, jholewinski Subscribers: llvm-commits, jhen, echristo, Differential Revision: http://reviews.llvm.org/D16739 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/NVPTX/global-ctor-empty.ll')
-rw-r--r--test/CodeGen/NVPTX/global-ctor-empty.ll5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/CodeGen/NVPTX/global-ctor-empty.ll b/test/CodeGen/NVPTX/global-ctor-empty.ll
new file mode 100644
index 00000000000..10ca0168b30
--- /dev/null
+++ b/test/CodeGen/NVPTX/global-ctor-empty.ll
@@ -0,0 +1,5 @@
+; RUN: llc < %s -march=nvptx -mcpu=sm_20 2>&1
+
+; Check that llc doesn't die when given an empty global ctor / dtor.
+@llvm.global_ctors = appending global [0 x { i32, void ()*, i8* }] []
+@llvm.global_dtors = appending global [0 x { i32, void ()*, i8* }] []