Skip to content

Commit 551f528

Browse files
author
Erich Keane
authored
[SYCL] Rework MarkDevice and children (#3475)
We identified during a previous review that collectKernelAttributes and the MarkDeviceFunction object are in a situation that is very difficult to maintain, so this attempts to fix that by making the ownership model clear.
1 parent 4e0a101 commit 551f528

File tree

5 files changed

+330
-281
lines changed

5 files changed

+330
-281
lines changed

clang/include/clang/Sema/Sema.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13190,7 +13190,7 @@ class Sema final {
1319013190
void checkSYCLDeviceVarDecl(VarDecl *Var);
1319113191
void copySYCLKernelAttrs(const CXXRecordDecl *KernelObj);
1319213192
void ConstructOpenCLKernel(FunctionDecl *KernelCallerFunc, MangleContext &MC);
13193-
void MarkDevice();
13193+
void MarkDevices();
1319413194

1319513195
/// Emit a diagnostic about the given attribute having a deprecated name, and
1319613196
/// also emit a fixit hint to generate the new attribute name.

clang/lib/Sema/Sema.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ void Sema::ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind) {
10391039
SyclIntHeader->emit(getLangOpts().SYCLIntHeader);
10401040
if (SyclIntFooter != nullptr)
10411041
SyclIntFooter->emit(getLangOpts().SYCLIntFooter);
1042-
MarkDevice();
1042+
MarkDevices();
10431043
}
10441044

10451045
emitDeferredDiags();

0 commit comments

Comments
 (0)