Skip to content

Commit 18587fc

Browse files
committed
[SYCL] Add device only docs
1 parent 0673acc commit 18587fc

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ def SYCLDeviceOnly : InheritableAttr {
15941594
let Spellings = [GNU<"sycl_device_only">];
15951595
let Subjects = SubjectList<[Function]>;
15961596
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
1597-
let Documentation = [Undocumented];
1597+
let Documentation = [SYCLDeviceOnlyDocs];
15981598
}
15991599

16001600
def SYCLGlobalVar : InheritableAttr {

clang/include/clang/Basic/AttrDocs.td

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4518,6 +4518,17 @@ implicitly inherit this attribute.
45184518
}];
45194519
}
45204520

4521+
def SYCLDeviceOnlyDocs : Documentation {
4522+
let Category = DocCatFunction;
4523+
let Heading = "sycl_device_only";
4524+
let Content = [{
4525+
This attribute can only be applied to functions and indicates that the function
4526+
is for the device only. This attribute allows to provide a device specific
4527+
overload of an existing function. All ``sycl_device_only`` function callees
4528+
implicitly inherit this attribute.
4529+
}];
4530+
}
4531+
45214532
def RISCVInterruptDocs : Documentation {
45224533
let Category = DocCatFunction;
45234534
let Heading = "interrupt (RISC-V)";

0 commit comments

Comments
 (0)