Skip to content

Commit 88ed70e

Browse files
author
Anastasia Stulova
committed
[OpenCL] Rename lang mode flag for C++ mode
Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++ or -std=clc++/-std=CLC++. This aligns with OpenCL C conversion and removes ambiguity with OpenCL C++. Differential Revision: https://reviews.llvm.org/D65102 llvm-svn: 367008
1 parent 2759545 commit 88ed70e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+68
-64
lines changed

clang/docs/LanguageExtensions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,7 @@ invoked.
17791779
17801780
.. code-block:: console
17811781
1782-
clang -cl-std=c++ test.cl
1782+
clang -cl-std=clc++ test.cl
17831783
17841784
If there are any global objects to be initialized the final binary will
17851785
contain ``@_GLOBAL__sub_I_test.cl`` kernel to be enqueued.

clang/docs/UsersManual.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,7 +2776,7 @@ restrictions from OpenCL C v2.0 will inherently apply. All OpenCL C builtin type
27762776
and function libraries are supported and can be used in the new mode.
27772777

27782778
To enable the new mode pass the following command line option when compiling ``.cl``
2779-
file ``-cl-std=c++`` or ``-std=c++``.
2779+
file ``-cl-std=clc++``, ``-cl-std=CLC++``, ``-std=clc++`` or ``-std=CLC++``.
27802780

27812781
.. code-block:: c++
27822782

@@ -2794,7 +2794,7 @@ file ``-cl-std=c++`` or ``-std=c++``.
27942794

27952795
.. code-block:: console
27962796
2797-
clang -cl-std=c++ test.cl
2797+
clang -cl-std=clc++ test.cl
27982798
27992799
.. _target_features:
28002800

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ def cl_mad_enable : Flag<["-"], "cl-mad-enable">, Group<opencl_Group>, Flags<[CC
518518
def cl_no_signed_zeros : Flag<["-"], "cl-no-signed-zeros">, Group<opencl_Group>, Flags<[CC1Option]>,
519519
HelpText<"OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.">;
520520
def cl_std_EQ : Joined<["-"], "cl-std=">, Group<opencl_Group>, Flags<[CC1Option]>,
521-
HelpText<"OpenCL language standard to compile for.">, Values<"cl,CL,cl1.1,CL1.1,cl1.2,CL1.2,cl2.0,CL2.0,c++">;
521+
HelpText<"OpenCL language standard to compile for.">, Values<"cl,CL,cl1.1,CL1.1,cl1.2,CL1.2,cl2.0,CL2.0,clc++,CLC++">;
522522
def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>, Flags<[CC1Option]>,
523523
HelpText<"OpenCL only. Allow denormals to be flushed to zero.">;
524524
def cl_fp32_correctly_rounded_divide_sqrt : Flag<["-"], "cl-fp32-correctly-rounded-divide-sqrt">, Group<opencl_Group>, Flags<[CC1Option]>,

clang/include/clang/Frontend/LangStandards.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ LANGSTANDARD_ALIAS_DEPR(opencl10, "CL")
174174
LANGSTANDARD_ALIAS_DEPR(opencl11, "CL1.1")
175175
LANGSTANDARD_ALIAS_DEPR(opencl12, "CL1.2")
176176
LANGSTANDARD_ALIAS_DEPR(opencl20, "CL2.0")
177+
LANGSTANDARD_ALIAS_DEPR(openclcpp, "CLC++")
177178

178179
// CUDA
179180
LANGSTANDARD(cuda, "cuda", CUDA, "NVIDIA CUDA(tm)",

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2433,7 +2433,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
24332433
.Cases("cl1.1", "CL1.1", LangStandard::lang_opencl11)
24342434
.Cases("cl1.2", "CL1.2", LangStandard::lang_opencl12)
24352435
.Cases("cl2.0", "CL2.0", LangStandard::lang_opencl20)
2436-
.Case("c++", LangStandard::lang_openclcpp)
2436+
.Cases("clc++", "CLC++", LangStandard::lang_openclcpp)
24372437
.Default(LangStandard::lang_unspecified);
24382438

24392439
if (OpenCLLangStd == LangStandard::lang_unspecified) {

clang/test/CodeGenCXX/mangle-address-space.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s --check-prefixes=CHECK,CHECKNOOCL
22
// RUN: %clang_cc1 -emit-llvm -triple x86_64-windows-msvc -o - %s | FileCheck %s --check-prefixes=WIN,WINNOOCL
3-
// RUN: %clang_cc1 -cl-std=c++ -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s --check-prefixes=CHECK,CHECKOCL
4-
// RUN: %clang_cc1 -cl-std=c++ -emit-llvm -triple x86_64-windows-msvc -o - %s | FileCheck %s --check-prefixes=WIN,WINOCL
3+
// RUN: %clang_cc1 -cl-std=clc++ -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s --check-prefixes=CHECK,CHECKOCL
4+
// RUN: %clang_cc1 -cl-std=clc++ -emit-llvm -triple x86_64-windows-msvc -o - %s | FileCheck %s --check-prefixes=WIN,WINOCL
55

66
// CHECKNOOCL-LABEL: define {{.*}}void @_Z2f0Pc
77
// WINNOOCL-LABEL: define {{.*}}void @"?f0@@YAXPEAD@Z"

clang/test/CodeGenOpenCL/builtins.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 %s -finclude-default-header -cl-std=c++ -fblocks -O0 -emit-llvm -o - -triple "spir-unknown-unknown" | FileCheck %s
1+
// RUN: %clang_cc1 %s -finclude-default-header -cl-std=clc++ -fblocks -O0 -emit-llvm -o - -triple "spir-unknown-unknown" | FileCheck %s
22

33
void testBranchingOnEnqueueKernel(queue_t default_queue, unsigned flags, ndrange_t ndrange) {
44
// Ensure `enqueue_kernel` can be branched upon.

clang/test/CodeGenOpenCL/images.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -emit-llvm -o - | FileCheck %s
2-
// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -emit-llvm -o - -cl-std=c++ | FileCheck %s
2+
// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -emit-llvm -o - -cl-std=clc++ | FileCheck %s
33

44
__attribute__((overloadable)) void read_image(read_only image1d_t img_ro);
55
__attribute__((overloadable)) void read_image(write_only image1d_t img_wo);

clang/test/CodeGenOpenCL/logical-ops.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 %s -emit-llvm -o - -cl-std=CL1.2 -O1 -triple x86_64-unknown-linux-gnu | FileCheck %s
2-
// RUN: %clang_cc1 %s -emit-llvm -o - -cl-std=c++ -O1 -triple x86_64-unknown-linux-gnu | FileCheck %s
2+
// RUN: %clang_cc1 %s -emit-llvm -o - -cl-std=clc++ -O1 -triple x86_64-unknown-linux-gnu | FileCheck %s
33

44
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
55

clang/test/CodeGenOpenCL/pipe_builtin.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -cl-ext=+cl_khr_subgroups -O0 -cl-std=c++ -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -cl-ext=+cl_khr_subgroups -O0 -cl-std=clc++ -o - %s | FileCheck %s
22
// FIXME: Add MS ABI manglings of OpenCL things and remove %itanium_abi_triple
33
// above to support OpenCL in the MS C++ ABI.
44

clang/test/CodeGenOpenCL/sampler.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang_cc1 %s -emit-llvm -triple spir-unknown-unknown -o - -O0 | FileCheck %s
22
// RUN: %clang_cc1 %s -cl-std=CL2.0 -emit-llvm -triple spir-unknown-unknown -o - -O0 | FileCheck %s
3-
// RUN: %clang_cc1 %s -cl-std=c++ -emit-llvm -triple spir-unknown-unknown -o - -O0 | FileCheck %s
3+
// RUN: %clang_cc1 %s -cl-std=clc++ -emit-llvm -triple spir-unknown-unknown -o - -O0 | FileCheck %s
44
//
55
// This test covers 5 cases of sampler initialzation:
66
// 1. function argument passing

clang/test/CodeGenOpenCL/spir_version.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// RUN: %clang_cc1 %s -triple "spir64-unknown-unknown" -emit-llvm -o - -cl-std=CL2.0 | FileCheck %s --check-prefix=CHECK-SPIR-CL20
77

88

9-
// RUN: %clang_cc1 %s -triple "spir64-unknown-unknown" -emit-llvm -o - -cl-std=c++ | FileCheck %s --check-prefix=CHECK-SPIR-CL20
9+
// RUN: %clang_cc1 %s -triple "spir64-unknown-unknown" -emit-llvm -o - -cl-std=clc++ | FileCheck %s --check-prefix=CHECK-SPIR-CL20
1010

1111
// RUN: %clang_cc1 %s -triple "amdgcn--amdhsa" -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-AMDGCN-CL10
1212
// RUN: %clang_cc1 %s -triple "amdgcn--amdhsa" -emit-llvm -o - -cl-std=CL1.2 | FileCheck %s --check-prefix=CHECK-AMDGCN-CL12

clang/test/CodeGenOpenCL/to_addr_builtin.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple spir-unknown-unknown -emit-llvm -O0 -cl-std=c++ -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple spir-unknown-unknown -emit-llvm -O0 -cl-std=clc++ -o - %s | FileCheck %s
22

33
// CHECK: %[[A:.*]] = type { float, float, float }
44
typedef struct {

clang/test/CodeGenOpenCLCXX/address-space-castoperators.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -emit-llvm -O0 -o - | FileCheck %s
1+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
22

33
void test_reinterpret_cast(){
44
__private float x;

clang/test/CodeGenOpenCLCXX/address-space-deduction.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -O0 -emit-llvm -o - | FileCheck %s -check-prefixes=COMMON,PTR
2-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -O0 -emit-llvm -o - -DREF | FileCheck %s -check-prefixes=COMMON,REF
1+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -O0 -emit-llvm -o - | FileCheck %s -check-prefixes=COMMON,PTR
2+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -O0 -emit-llvm -o - -DREF | FileCheck %s -check-prefixes=COMMON,REF
33

44
#ifdef REF
55
#define PTR &

clang/test/CodeGenOpenCLCXX/address-space-deduction2.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -O0 -emit-llvm -o - | FileCheck %s
1+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -O0 -emit-llvm -o - | FileCheck %s
22

33
class P {
44
public:

clang/test/CodeGenOpenCLCXX/addrspace-conversion.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -emit-llvm -O0 -o - | FileCheck %s
1+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
22

33
void bar(__generic volatile unsigned int* ptr)
44
{

clang/test/CodeGenOpenCLCXX/addrspace-derived-base.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 %s -triple spir -cl-std=c++ -emit-llvm -O0 -o - | FileCheck %s
1+
// RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
22

33
struct B {
44
int mb;

clang/test/CodeGenOpenCLCXX/addrspace-of-this.cl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -emit-llvm -pedantic -verify -O0 -o - -DDECL | FileCheck %s --check-prefixes="COMMON,EXPL"
2-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -emit-llvm -pedantic -verify -O0 -o - -DDECL -DUSE_DEFLT | FileCheck %s --check-prefixes="COMMON,IMPL"
3-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -emit-llvm -pedantic -verify -O0 -o - | FileCheck %s --check-prefixes="COMMON,IMPL"
1+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -pedantic -verify -O0 -o - -DDECL | FileCheck %s --check-prefixes="COMMON,EXPL"
2+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -pedantic -verify -O0 -o - -DDECL -DUSE_DEFLT | FileCheck %s --check-prefixes="COMMON,IMPL"
3+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -pedantic -verify -O0 -o - | FileCheck %s --check-prefixes="COMMON,IMPL"
44
// expected-no-diagnostics
55

66
// Test that the 'this' pointer is in the __generic address space.

clang/test/CodeGenOpenCLCXX/addrspace-operators.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//RUN: %clang_cc1 %s -triple spir -cl-std=c++ -emit-llvm -O0 -o - | FileCheck %s
1+
//RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
22

33
enum E {
44
a,

clang/test/CodeGenOpenCLCXX/addrspace-references.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//RUN: %clang_cc1 %s -cl-std=c++ -triple spir -emit-llvm -o - | FileCheck %s
1+
//RUN: %clang_cc1 %s -cl-std=clc++ -triple spir -emit-llvm -o - | FileCheck %s
22

33
int bar(const unsigned int &i);
44
// CHECK-LABEL: define spir_func void @_Z3foov()

clang/test/CodeGenOpenCLCXX/addrspace-with-class.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -emit-llvm -O0 -o - | FileCheck %s
2-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -emit-llvm -O0 -o - | FileCheck %s --check-prefix=CHECK-DEFINITIONS
1+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
2+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CLC++ -emit-llvm -O0 -o - | FileCheck %s --check-prefix=CHECK-DEFINITIONS
33

44
// This test ensures the proper address spaces and address space cast are used
55
// for constructors, member functions and destructors.

clang/test/CodeGenOpenCLCXX/atexit.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//RUN: %clang_cc1 %s -triple spir -cl-std=c++ -emit-llvm -O0 -o - | FileCheck %s
1+
//RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
22

33
struct S {
44
~S(){};

clang/test/CodeGenOpenCLCXX/global_init.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 %s -triple spir -cl-std=c++ -emit-llvm -O0 -o - | FileCheck %s
1+
// RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
22

33
struct S {
44
S() {}

clang/test/CodeGenOpenCLCXX/local_addrspace_init.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 %s -triple spir -cl-std=c++ -emit-llvm -O0 -o - | FileCheck %s
1+
// RUN: %clang_cc1 %s -triple spir -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
22

33
// Test that we don't initialize local address space objects.
44
//CHECK: @_ZZ4testE1i = internal addrspace(3) global i32 undef

clang/test/CodeGenOpenCLCXX/method-overload-address-space.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -emit-llvm -O0 -o - | FileCheck %s
1+
//RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -emit-llvm -O0 -o - | FileCheck %s
22

33
struct C {
44
void foo() __local;

clang/test/CodeGenOpenCLCXX/template-address-spaces.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -cl-std=c++ %s -emit-llvm -o - -O0 -triple spir-unknown-unknown | FileCheck %s
1+
// RUN: %clang_cc1 -cl-std=clc++ %s -emit-llvm -o - -O0 -triple spir-unknown-unknown | FileCheck %s
22

33
template <typename T>
44
struct S{

clang/test/Driver/autocomplete.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@
3434
// RUN: %clang --autocomplete=-cl-std=,CL2 | FileCheck %s -check-prefix=CLSTD
3535
// CLSTD: CL2.0
3636
// RUN: %clang --autocomplete=-cl-std= | FileCheck %s -check-prefix=CLSTDALL
37-
// CLSTDALL: c++
38-
// CLSTDALL-NEXT: cl
37+
38+
// CLSTDALL: cl
3939
// CLSTDALL-NEXT: CL
4040
// CLSTDALL-NEXT: cl1.1
4141
// CLSTDALL-NEXT: CL1.1
4242
// CLSTDALL-NEXT: cl1.2
4343
// CLSTDALL-NEXT: CL1.2
4444
// CLSTDALL-NEXT: cl2.0
4545
// CLSTDALL-NEXT: CL2.0
46+
// CLSTDALL-NEXT: clc++
47+
// CLSTDALL-NEXT: CLC++
4648
// RUN: %clang --autocomplete=-fno-sanitize-coverage=,f | FileCheck %s -check-prefix=FNOSANICOVER
4749
// FNOSANICOVER: func
4850
// RUN: %clang --autocomplete=-fno-sanitize-coverage= | FileCheck %s -check-prefix=FNOSANICOVERALL

clang/test/Driver/opencl.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %clang -S -### -cl-std=CL1.1 %s 2>&1 | FileCheck --check-prefix=CHECK-CL11 %s
33
// RUN: %clang -S -### -cl-std=CL1.2 %s 2>&1 | FileCheck --check-prefix=CHECK-CL12 %s
44
// RUN: %clang -S -### -cl-std=CL2.0 %s 2>&1 | FileCheck --check-prefix=CHECK-CL20 %s
5-
// RUN: %clang -S -### -cl-std=c++ %s 2>&1 | FileCheck --check-prefix=CHECK-CLCPP %s
5+
// RUN: %clang -S -### -cl-std=clc++ %s 2>&1 | FileCheck --check-prefix=CHECK-CLCPP %s
66
// RUN: %clang -S -### -cl-opt-disable %s 2>&1 | FileCheck --check-prefix=CHECK-OPT-DISABLE %s
77
// RUN: %clang -S -### -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-STRICT-ALIASING %s
88
// RUN: %clang -S -### -cl-single-precision-constant %s 2>&1 | FileCheck --check-prefix=CHECK-SINGLE-PRECISION-CONST %s
@@ -22,7 +22,7 @@
2222
// CHECK-CL11: "-cc1" {{.*}} "-cl-std=CL1.1"
2323
// CHECK-CL12: "-cc1" {{.*}} "-cl-std=CL1.2"
2424
// CHECK-CL20: "-cc1" {{.*}} "-cl-std=CL2.0"
25-
// CHECK-CLCPP: "-cc1" {{.*}} "-cl-std=c++"
25+
// CHECK-CLCPP: "-cc1" {{.*}} "-cl-std=clc++"
2626
// CHECK-OPT-DISABLE: "-cc1" {{.*}} "-cl-opt-disable"
2727
// CHECK-STRICT-ALIASING: "-cc1" {{.*}} "-cl-strict-aliasing"
2828
// CHECK-SINGLE-PRECISION-CONST: "-cc1" {{.*}} "-cl-single-precision-constant"

clang/test/Frontend/opencl.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL1.1 -DSYNTAX
33
// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL1.2 -DSYNTAX
44
// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL2.0 -DSYNTAX
5-
// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=c++ -DSYNTAX
5+
// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=clc++ -DSYNTAX
66
// RUN: %clang_cc1 %s -verify -fsyntax-only -fblocks -DBLOCKS -DSYNTAX
77
// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL1.1 -fblocks -DBLOCKS -DSYNTAX
88
// RUN: %clang_cc1 %s -verify -fsyntax-only -cl-std=CL1.2 -fblocks -DBLOCKS -DSYNTAX

clang/test/Frontend/stdlang.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
// RUN: %clang_cc1 -x cl -cl-std=cl1.1 -DOPENCL %s
55
// RUN: %clang_cc1 -x cl -cl-std=cl1.2 -DOPENCL %s
66
// RUN: %clang_cc1 -x cl -cl-std=cl2.0 -DOPENCL %s
7-
// RUN: %clang_cc1 -x cl -cl-std=c++ -DOPENCL %s
7+
// RUN: %clang_cc1 -x cl -cl-std=clc++ -DOPENCL %s
88
// RUN: %clang_cc1 -x cl -cl-std=CL -DOPENCL %s
99
// RUN: %clang_cc1 -x cl -cl-std=CL1.1 -DOPENCL %s
1010
// RUN: %clang_cc1 -x cl -cl-std=CL1.2 -DOPENCL %s
1111
// RUN: %clang_cc1 -x cl -cl-std=CL2.0 -DOPENCL %s
12+
// RUN: %clang_cc1 -x cl -cl-std=CLC++ -DOPENCL %s
1213
// RUN: not %clang_cc1 -x cl -std=c99 -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-C99 %s
1314
// RUN: not %clang_cc1 -x cl -cl-std=invalid -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID %s
1415
// CHECK-C99: error: invalid argument '-std=c99' not allowed with 'OpenCL'

clang/test/Headers/opencl-c-header.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clang_cc1 -O0 -triple spir-unknown-unknown -internal-isystem ../../lib/Headers -include opencl-c.h -emit-llvm -o - %s -verify | FileCheck %s
22
// RUN: %clang_cc1 -O0 -triple spir-unknown-unknown -internal-isystem ../../lib/Headers -include opencl-c.h -emit-llvm -o - %s -verify -cl-std=CL1.1 | FileCheck %s
33
// RUN: %clang_cc1 -O0 -triple spir-unknown-unknown -internal-isystem ../../lib/Headers -include opencl-c.h -emit-llvm -o - %s -verify -cl-std=CL1.2 | FileCheck %s
4-
// RUN: %clang_cc1 -O0 -triple spir-unknown-unknown -internal-isystem ../../lib/Headers -include opencl-c.h -emit-llvm -o - %s -verify -cl-std=c++ | FileCheck %s --check-prefix=CHECK20
4+
// RUN: %clang_cc1 -O0 -triple spir-unknown-unknown -internal-isystem ../../lib/Headers -include opencl-c.h -emit-llvm -o - %s -verify -cl-std=clc++ | FileCheck %s --check-prefix=CHECK20
55

66
// Test including the default header as a module.
77
// The module should be compiled only once and loaded from cache afterwards.

clang/test/Parser/opencl-cxx-keywords.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -verify -fsyntax-only
2-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -verify -fsyntax-only -fexceptions -fcxx-exceptions
1+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -verify -fsyntax-only
2+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -verify -fsyntax-only -fexceptions -fcxx-exceptions
33

44
// This test checks that various C++ and OpenCL C keywords are not available
55
// in OpenCL.

clang/test/Parser/opencl-cxx-virtual.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -fsyntax-only -verify
1+
// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=clc++ -fsyntax-only -verify
22

33
// Test that virtual functions and abstract classes are rejected.
44
class virtual_functions {

clang/test/Preprocessor/predefined-macros.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
// RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-CL20
132132
// RUN: %clang_cc1 %s -E -dM -o - -x cl -cl-fast-relaxed-math \
133133
// RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-FRM
134-
// RUN: %clang_cc1 %s -E -dM -o - -x cl -cl-std=c++ \
134+
// RUN: %clang_cc1 %s -E -dM -o - -x cl -cl-std=clc++ \
135135
// RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-CLCPP10
136136
// CHECK-CL10: #define CL_VERSION_1_0 100
137137
// CHECK-CL10: #define CL_VERSION_1_1 110

clang/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DCONSTANT -cl-std=CL2.0
22
// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DGLOBAL -cl-std=CL2.0
33
// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DGENERIC -cl-std=CL2.0
4-
// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DCONSTANT -cl-std=c++
5-
// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DGLOBAL -cl-std=c++
6-
// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DGENERIC -cl-std=c++
4+
// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DCONSTANT -cl-std=clc++
5+
// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DGLOBAL -cl-std=clc++
6+
// RUN: %clang_cc1 %s -ffake-address-space-map -verify -pedantic -fsyntax-only -DGENERIC -cl-std=clc++
77

88
/* OpenCLC v2.0 adds a set of restrictions for conversions between pointers to
99
* different address spaces, mainly described in Sections 6.5.5 and 6.5.6.

clang/test/SemaOpenCL/address-spaces.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
22
// RUN: %clang_cc1 %s -cl-std=CL2.0 -verify -pedantic -fsyntax-only
3-
// RUN: %clang_cc1 %s -cl-std=c++ -verify -pedantic -fsyntax-only
3+
// RUN: %clang_cc1 %s -cl-std=clc++ -verify -pedantic -fsyntax-only
44

55
__constant int ci = 1;
66

clang/test/SemaOpenCL/builtin.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2
2-
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=c++
2+
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=clc++
33

44
// expected-no-diagnostics
55

clang/test/SemaOpenCL/clk_event_t.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.0
2-
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=c++
2+
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=clc++
33

44
// Taken from opencl-c.h
55
#define CLK_NULL_EVENT (__builtin_astype(((__SIZE_MAX__)), clk_event_t))

clang/test/SemaOpenCL/extension-version.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
// RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple spir-unknown-unknown
33
// RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple spir-unknown-unknown
44
// RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple spir-unknown-unknown
5-
// RUN: %clang_cc1 -x cl -cl-std=c++ %s -verify -triple spir-unknown-unknown
5+
// RUN: %clang_cc1 -x cl -cl-std=clc++ %s -verify -triple spir-unknown-unknown
66
// RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES
77
// RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES
88
// RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES
99
// RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES
10-
// RUN: %clang_cc1 -x cl -cl-std=c++ %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES
10+
// RUN: %clang_cc1 -x cl -cl-std=clc++ %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES
1111

1212
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) && !defined(TEST_CORE_FEATURES)
1313
// expected-no-diagnostics

0 commit comments

Comments
 (0)