summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCUDA/debug-info-template.cu
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCUDA/debug-info-template.cu')
-rw-r--r--test/CodeGenCUDA/debug-info-template.cu10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenCUDA/debug-info-template.cu b/test/CodeGenCUDA/debug-info-template.cu
new file mode 100644
index 0000000000..078e2ecff9
--- /dev/null
+++ b/test/CodeGenCUDA/debug-info-template.cu
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 %s --std=c++11 -triple x86_64-unknown-linux -emit-llvm -o - -debug-info-kind=limited -dwarf-version=2 -debugger-tuning=gdb | FileCheck %s
+
+#include "Inputs/cuda.h"
+
+__device__ void f();
+template<void(*F)()> __global__ void t() { F(); }
+__host__ void g() { t<f><<<1,1>>>(); }
+
+// Ensure the value of device-function (as value template parameter) is null.
+// CHECK: !DITemplateValueParameter(name: "F", type: !{{[0-9]+}}, value: null)