Skip to content

Commit bb8b79d

Browse files
committed
[Clang][OpenMP] Fix ast testing for vendors in metadirective
OpenMP metadirective considers `llvm` as the compiler vendor for upstream and `amd` for the downstream.
1 parent 74b0ed6 commit bb8b79d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

clang/test/AST/ast-dump-openmp-begin-declare-variant_decl_1.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s | FileCheck %s
22
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++| FileCheck %s
33
// expected-no-diagnostics
4-
// XFAIL: *
5-
64
// FIXME: We have to improve the warnings here as nothing is impacted by the declare variant.
75
int also_before(void) {
86
return 0;
@@ -11,10 +9,10 @@ int also_before(void) {
119
#pragma omp begin declare variant match(device={kind(cpu)})
1210
int also_before(void);
1311
#pragma omp end declare variant
14-
#pragma omp begin declare variant match(implementation={vendor(score(100):llvm)})
12+
#pragma omp begin declare variant match(implementation={vendor(score(100):amd)})
1513
int also_after(void);
1614
#pragma omp end declare variant
17-
#pragma omp begin declare variant match(implementation={vendor(score(0):llvm)})
15+
#pragma omp begin declare variant match(implementation={vendor(score(0):amd)})
1816
int also_before(void);
1917
#pragma omp end declare variant
2018

@@ -29,7 +27,7 @@ int test(void) {
2927

3028
// Make sure:
3129
// - we do see the ast nodes for the cpu kind
32-
// - we do see the ast nodes for the llvm vendor
30+
// - we do see the ast nodes for the amd vendor
3331
// - we pick the right callees
3432

3533
// CHECK: |-FunctionDecl [[ADDR_0:0x[a-z0-9]*]] <{{.*}}, line:7:1> line:5:5 used also_before 'int ({{.*}})'

0 commit comments

Comments
 (0)