Skip to content

Commit 7b6bdaf

Browse files
committed
Add test
1 parent 20ba97b commit 7b6bdaf

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

clang/test/OpenMP/debug-info-kmpc.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc %s -o %t-ppc-host.bc
2+
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device "-debug-info-kind=constructor" -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s
3+
4+
// Check that we properly attach debug info to the __kmpc_global_thread_num call
5+
// CHECK: call {{.*}} @__kmpc_global_thread_num{{.*}}!dbg
6+
7+
extern int bar();
8+
void foo() {
9+
#pragma omp target teams
10+
{
11+
#pragma omp parallel
12+
{
13+
bar();
14+
}
15+
}
16+
}
17+

0 commit comments

Comments
 (0)