Skip to content

Commit dafdcfe

Browse files
committed
[SYCL] change sycl version accrodnig to standard
[SYCL] make sycl version long integer
1 parent 7ceb19e commit dafdcfe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI,
587587
if (LangOpts.getSYCLVersion() == LangOptions::SYCL_2017)
588588
Builder.defineMacro("CL_SYCL_LANGUAGE_VERSION", "121");
589589
else if (LangOpts.getSYCLVersion() == LangOptions::SYCL_2020)
590-
Builder.defineMacro("SYCL_LANGUAGE_VERSION", "202001");
590+
Builder.defineMacro("SYCL_LANGUAGE_VERSION", "202012L");
591591
}
592592

593593
// Not "standard" per se, but available even with the -undef flag.

clang/test/Preprocessor/sycl-macro.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
// CHECK-NOT:#define __SYCL_DEVICE_ONLY__ 1
1111
// CHECK-NOT:#define CL_SYCL_LANGUAGE_VERSION 121
1212
// CHECK-SYCL-STD:#define CL_SYCL_LANGUAGE_VERSION 121
13-
// CHECK-SYCL-STD-2020:#define SYCL_LANGUAGE_VERSION 202001
13+
// CHECK-SYCL-STD-2020:#define SYCL_LANGUAGE_VERSION 202012
1414
// CHECK-SYCL:#define __SYCL_DEVICE_ONLY__ 1

0 commit comments

Comments
 (0)