Skip to content

Commit c8cd72e

Browse files
authored
Merge pull request #221 from azabazno/opencl_30_nosvm_2_10
OpenCL C 3.0 patch update: allow nosvm attribute for 3.0
2 parents fe52deb + d0583e2 commit c8cd72e

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 911aba1f4a95f914994957a769c938eac04555ca Mon Sep 17 00:00:00 2001
1+
From 01c068c2f8e4e7103b36bc2a5093dd9003b2ef27 Mon Sep 17 00:00:00 2001
22
From: Anton Zabaznov <[email protected]>
33
Date: Tue, 22 Sep 2020 19:03:50 +0300
4-
Subject: [PATCH 1/2] OpenCL 3.0 support
4+
Subject: [PATCH] OpenCL 3.0 support
55

66
---
77
clang/include/clang/Basic/Builtins.def | 65 +-
@@ -29,7 +29,7 @@ Subject: [PATCH 1/2] OpenCL 3.0 support
2929
clang/lib/Sema/Sema.cpp | 47 +-
3030
clang/lib/Sema/SemaChecking.cpp | 38 +-
3131
clang/lib/Sema/SemaDecl.cpp | 15 +-
32-
clang/lib/Sema/SemaDeclAttr.cpp | 7 +
32+
clang/lib/Sema/SemaDeclAttr.cpp | 9 +-
3333
clang/lib/Sema/SemaDeclCXX.cpp | 10 +
3434
clang/lib/Sema/SemaLookup.cpp | 19 +-
3535
clang/lib/Sema/SemaType.cpp | 14 +-
@@ -71,7 +71,7 @@ Subject: [PATCH 1/2] OpenCL 3.0 support
7171
.../SemaOpenCL/invalid-pipe-builtin-cl2.0.cl | 1 +
7272
clang/test/SemaOpenCL/storageclass-cl20.cl | 1 +
7373
.../TableGen/ClangOpenCLBuiltinEmitter.cpp | 35 +-
74-
67 files changed, 3661 insertions(+), 722 deletions(-)
74+
67 files changed, 3662 insertions(+), 723 deletions(-)
7575
create mode 100644 clang/test/CodeGenOpenCL/generic-address-space-feature.cl
7676
create mode 100644 clang/test/Sema/feature-extensions-simult-support.cl
7777
create mode 100644 clang/test/Sema/features-ignore-pragma.cl
@@ -7142,9 +7142,18 @@ index 64146f4a912..c1e629b5dc7 100644
71427142
<< Scope << "global or constant";
71437143
else
71447144
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
7145-
index 849bc09063b..d891526ccb9 100644
7145+
index 849bc09063b..c963b95b131 100644
71467146
--- a/clang/lib/Sema/SemaDeclAttr.cpp
71477147
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
7148+
@@ -6362,7 +6362,7 @@ static void handleInternalLinkageAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
7149+
}
7150+
7151+
static void handleOpenCLNoSVMAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
7152+
- if (S.LangOpts.OpenCLVersion != 200)
7153+
+ if (S.LangOpts.OpenCLVersion < 200)
7154+
S.Diag(AL.getLoc(), diag::err_attribute_requires_opencl_version)
7155+
<< AL << "2.0" << 0;
7156+
else
71487157
@@ -6446,6 +6446,13 @@ static void handleOpenCLAccessAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
71497158
<< AL << PDecl->getType() << DeclTy->isImageType();
71507159
D->setInvalidDecl(true);
@@ -8249,5 +8258,5 @@ index 41d33b55068..f50652493e5 100644
82498258
BuiltinNameEmitter NameChecker(Records, OS);
82508259
NameChecker.Emit();
82518260
--
8252-
2.17.1
8261+
2.29.2
82538262

0 commit comments

Comments
 (0)