diff options
| author | Yong He <yonghe@outlook.com> | 2022-04-12 15:23:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-12 15:23:53 -0700 |
| commit | 65c2e7f1ccc6cdb5daec343c7e32b4a9dc463ae4 (patch) | |
| tree | b13a93f5fa621a50ce3c100f018730c882ca3e9c /source/slang/core.meta.slang | |
| parent | 89560d62f3fb42e0f76cbae76c23eac437b65eba (diff) | |
Support `[DllImport]` (#2181)
* Support `[DllImport]`
* Fix.
* Fix.
* Fix array type emit in cpp.
* Fix.
* Fix.
* Fix
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/core.meta.slang')
| -rw-r--r-- | source/slang/core.meta.slang | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/slang/core.meta.slang b/source/slang/core.meta.slang index c8e05d769..c3e41b8fc 100644 --- a/source/slang/core.meta.slang +++ b/source/slang/core.meta.slang @@ -342,11 +342,18 @@ ${{{{ // Declare built-in pointer type // (eventually we can have the traditional syntax sugar for this) }}}} + +__magic_type(NullPtrType) +struct NullPtr +{ +}; + __generic<T> __magic_type(PtrType) __intrinsic_type($(kIROp_PtrType)) struct Ptr -{}; +{ +}; __generic<T> __magic_type(OutType) @@ -2164,6 +2171,10 @@ attribute_syntax [__extern] : ExternAttribute; __attributeTarget(FunctionDeclBase) attribute_syntax [__unsafeForceInlineEarly] : UnsafeForceInlineEarlyAttribute; +__attributeTarget(FuncDecl) +attribute_syntax [DllImport(modulePath: String)] : DllImportAttribute; + + // Inheritance Control __attributeTarget(AggTypeDecl) attribute_syntax [sealed] : SealedAttribute; @@ -2185,3 +2196,4 @@ attribute_syntax [noinline] : NoInlineAttribute; __attributeTarget(StructDecl) attribute_syntax [payload] : PayloadAttribute; + |
