1 // RUN: %clang_cc1 %s -triple "spir64-unknown-unknown" -emit-llvm -o - -cl-std=CL2.0 | FileCheck %s --check-prefix=CHECK-NO-CXX
3 // RUN: %clang_cc1 %s -triple "spir64-unknown-unknown" -emit-llvm -o - -cl-std=clc++1.0 | FileCheck %s --check-prefix=CHECK-CXX100
4 // RUN: %clang_cc1 %s -triple "spir64-unknown-unknown" -emit-llvm -o - -cl-std=clc++2021 | FileCheck %s --check-prefix=CHECK-CXX2021
6 // This test checks that opencl.cxx.version metadata is emitted accordingly.
7 // It avoids any C++ features to enable checking that the metadata is not emitted in non-C++ mode.
11 // CHECK-NO-CXX-NOT: opencl.cxx.version
13 // CHECK-CXX100-DAG: !opencl.ocl.version = !{[[OCL:![0-9]+]]}
14 // CHECK-CXX100-DAG: !opencl.cxx.version = !{[[CXX:![0-9]+]]}
15 // CHECK-CXX100-DAG: [[OCL]] = !{i32 2, i32 0}
16 // CHECK-CXX100-DAG: [[CXX]] = !{i32 1, i32 0}
18 // CHECK-CXX2021-DAG: !opencl.ocl.version = !{[[OCL:![0-9]+]]}
19 // CHECK-CXX2021-DAG: !opencl.cxx.version = !{[[CXX:![0-9]+]]}
20 // CHECK-CXX2021-DAG: [[OCL]] = !{i32 3, i32 0}
21 // CHECK-CXX2021-DAG: [[CXX]] = !{i32 2021, i32 0}