| 1 |
/* 'testsuite/dbg-line-column.cl' */ |
| 2 |
// "-g" option does not generate dwarf column information on Windows. |
| 3 |
// RUN: %occ-cli %s --cl-options="-g" %cfg_path --cl-device=%cl_device --output=%t.bc |
| 4 |
// RUN: llvm-dis %t.bc -o - | FileCheck %s |
| 5 |
|
| 6 |
// CHECK: call void @llvm.dbg.declare(metadata ptr %input.addr, metadata ![[#]], metadata !DIExpression(DW_OP_constu, 0, DW_OP_swap, DW_OP_xderef)), !dbg ![[LOC:[0-9]+]] |
| 7 |
// Only check there is line and scope information since column information |
| 8 |
// isn't generated on Windows |
| 9 |
// CHECK: ![[LOC]] = !DILocation(line: {{[0-9]+}}, {{.*}}scope: !{{[0-9]+}}) |
| 10 |
|
| 11 |
int foo(__global int *input) { |
| 12 |
*input += 5; |
| 13 |
|
| 14 |
return 3; |
| 15 |
} |
| 16 |
|
| 17 |
__kernel void ocl_test_kernel(__global int *ocl_test_results) { |
| 18 |
int a = foo(ocl_test_results); |
| 19 |
} |