forked from apple/swift-clang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose CUDA function attributes to the C interface.
Until now all CUDA-specific attributes were represented with CXCursor_UnexposedAttr; now they are actually implemented, including the Python bindings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209767 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
5 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: c-index-test -test-load-source all -x cuda %s | FileCheck %s | ||
|
||
__attribute__((device)) void f_device(); | ||
__attribute__((global)) void f_global(); | ||
__attribute__((constant)) int* g_constant; | ||
__attribute__((host)) void f_host(); | ||
|
||
|
||
// CHECK: attributes-cuda.cu:3:30: FunctionDecl=f_device:3:30 | ||
// CHECK-NEXT: attributes-cuda.cu:3:16: attribute(device) | ||
// CHECK: attributes-cuda.cu:4:30: FunctionDecl=f_global:4:30 | ||
// CHECK-NEXT: attributes-cuda.cu:4:16: attribute(global) | ||
// CHECK: attributes-cuda.cu:5:32: VarDecl=g_constant:5:32 (Definition) | ||
// CHECK-NEXT: attributes-cuda.cu:5:16: attribute(constant) | ||
// CHECK: attributes-cuda.cu:6:28: FunctionDecl=f_host:6:28 | ||
// CHECK-NEXT: attributes-cuda.cu:6:16: attribute(host) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters