Skip to content

Commit 33cb76d

Browse files
authored
Merge pull request #223 from azabazno/opencl_30_nosvm_2_8
OpenCL C 3.0 patch update: allow nosvm attribute for 3.0
2 parents 91c2d22 + c710d0c commit 33cb76d

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

patches/clang/0006-OpenCL-3.0-support.patch

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From ebfc732638fa68d1bc79fbad02011fe71ffc075a Mon Sep 17 00:00:00 2001
1+
From 6dd990a8258c0f46b0202492624770b57c0cca12 Mon Sep 17 00:00:00 2001
22
From: Anton Zabaznov <[email protected]>
33
Date: Thu, 24 Sep 2020 00:12:24 +0300
44
Subject: [PATCH] OpenCL 3.0 support
@@ -27,7 +27,7 @@ Subject: [PATCH] OpenCL 3.0 support
2727
lib/Sema/Sema.cpp | 47 +-
2828
lib/Sema/SemaChecking.cpp | 38 +-
2929
lib/Sema/SemaDecl.cpp | 9 +-
30-
lib/Sema/SemaDeclAttr.cpp | 7 +
30+
lib/Sema/SemaDeclAttr.cpp | 9 +-
3131
lib/Sema/SemaDeclCXX.cpp | 10 +
3232
lib/Sema/SemaType.cpp | 24 +-
3333
test/CodeGenOpenCL/addr-space-struct-arg.cl | 7 +-
@@ -65,7 +65,7 @@ Subject: [PATCH] OpenCL 3.0 support
6565
.../SemaOpenCL/forget-unsupported-builtins.cl | 23 +
6666
test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl | 1 +
6767
test/SemaOpenCL/storageclass-cl20.cl | 1 +
68-
61 files changed, 3613 insertions(+), 722 deletions(-)
68+
61 files changed, 3614 insertions(+), 723 deletions(-)
6969
create mode 100644 test/CodeGenOpenCL/generic-address-space-feature.cl
7070
create mode 100644 test/Sema/feature-extensions-simult-support.cl
7171
create mode 100644 test/Sema/features-ignore-pragma.cl
@@ -6967,9 +6967,18 @@ index 7ddf2e88b7..8105b799e0 100644
69676967
<< Scope << "global or constant";
69686968
else
69696969
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
6970-
index c4c3598ee7..646aea2bd5 100644
6970+
index c4c3598ee7..8e56a1f4f0 100644
69716971
--- a/lib/Sema/SemaDeclAttr.cpp
69726972
+++ b/lib/Sema/SemaDeclAttr.cpp
6973+
@@ -6112,7 +6112,7 @@ static void handleInternalLinkageAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
6974+
}
6975+
6976+
static void handleOpenCLNoSVMAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
6977+
- if (S.LangOpts.OpenCLVersion != 200)
6978+
+ if (S.LangOpts.OpenCLVersion < 200)
6979+
S.Diag(AL.getLoc(), diag::err_attribute_requires_opencl_version)
6980+
<< AL << "2.0" << 0;
6981+
else
69736982
@@ -6194,6 +6194,13 @@ static void handleOpenCLAccessAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
69746983
<< AL << PDecl->getType() << DeclTy->isImageType();
69756984
D->setInvalidDecl(true);
@@ -7934,5 +7943,5 @@ index 581701d2a6..469c526ebc 100644
79347943
int G2 = 0;
79357944
global int G3 = 0;
79367945
--
7937-
2.17.1
7946+
2.29.2
79387947

0 commit comments

Comments
 (0)