summaryrefslogtreecommitdiff
path: root/source/slang/core.meta.slang
diff options
context:
space:
mode:
authorDavid Siher <32305650+dsiher@users.noreply.github.com>2022-02-03 19:16:54 -0800
committerGitHub <noreply@github.com>2022-02-03 19:16:54 -0800
commit5eb835f0332868fd56ac14ce7560e0ae9cfafec9 (patch)
tree67ed2ae3b2527e8cfa66f835062490decf3052ad /source/slang/core.meta.slang
parent1eda86377847155ed3f0e0b2e40a105af35bd387 (diff)
Fixed naming conflicts in heterogeneous-hello-world (#2114)
* Fixed naming conflicts in heterogeneous-hello-world Added 3 new modifiers (`__unmangled`, `__exportDirectly`, `__externLib`) `__unmangled` causes mangleName() to return the normal name of the decl. `__exportDirectly` changes parent decl name concatenation behavior to use "::" instead of "." (for Name Hint) and emits the name hint when it exists, otherwise it emits the mangled name. `__externLib` stops Slang from emitting the corresponding struct. Also made necessary changes to heterogeneous-hello-world so that this new functionality is shown off. * Undo unintentional formatting changes Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/core.meta.slang')
-rw-r--r--source/slang/core.meta.slang20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/slang/core.meta.slang b/source/slang/core.meta.slang
index ca07b299d..779900fd5 100644
--- a/source/slang/core.meta.slang
+++ b/source/slang/core.meta.slang
@@ -63,6 +63,26 @@ syntax unorm : UNormModifier;
///
syntax snorm : SNormModifier;
+/// Modifier to indicate that a function name should not be mangled
+/// by the Slang compiler.
+///
+/// The `__unmangled` modifier should only be valid on functions
+/// and is mainly useful for the experimental heterogeneous
+/// features of Slang.
+///
+syntax __unmangled : UnmangledModifier;
+
+/// Modifier to indicate that a function name should be exported
+/// directly. Used in tandem with `__unmangled` in heterogeneous
+/// features of Slang.
+///
+syntax __exportDirectly : __exportDirectly;
+
+/// Modifier to indicate that a struct is defined externally and
+/// should therefore not be exported by Slang.
+///
+syntax __externLib : __externLib;
+
/// A type that can be used as an operand for builtins
[sealed]
[builtin]