Skip to content

Commit baed361

Browse files
committed
Make a simple handler, align device_global
1 parent ec3d114 commit baed361

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,7 @@ def SYCLDeviceGlobal : InheritableAttr {
12671267
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
12681268
// Only used internally by the SYCL implementation
12691269
let Documentation = [Undocumented];
1270+
let SimpleHandler = 1;
12701271
}
12711272

12721273
// Marks functions which must not be vectorized via horizontal SIMT widening,

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10429,9 +10429,6 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
1042910429
case ParsedAttr::AT_SYCLSpecialClass:
1043010430
handleSimpleAttribute<SYCLSpecialClassAttr>(S, D, AL);
1043110431
break;
10432-
case ParsedAttr::AT_SYCLDeviceGlobal:
10433-
handleSimpleAttribute<SYCLDeviceGlobalAttr>(S, D, AL);
10434-
break;
1043510432
case ParsedAttr::AT_SYCLDevice:
1043610433
handleSYCLDeviceAttr(S, D, AL);
1043710434
break;

clang/test/CodeGenSYCL/Inputs/sycl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ template <typename T>
134134
class [[__sycl_detail__::device_global]] device_global {
135135
public:
136136
const T &get() const noexcept { return *Data; }
137-
device_global() = default;
137+
device_global() {}
138138

139139
private:
140140
T *Data;

clang/test/CodeGenSYCL/device_global_int_footer_header.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace {
104104
struct HasVarTemplate {
105105
constexpr HasVarTemplate() {}
106106
template <typename T>
107-
static constexpr device_global<T> VarTempl{};
107+
static const device_global<T> VarTempl;
108108
};
109109

110110
} // namespace

0 commit comments

Comments
 (0)