diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2024-09-16 16:04:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-16 16:04:45 -0400 |
| commit | d866c0b9dfc0fdc8ad8cede4d7a8593f7ddf4716 (patch) | |
| tree | 77cd8713987e575aaf8c7436cd9d2fda8ddc9e63 /include | |
| parent | c46ca4cfeff2c78078aa3c4014cd6b0341ee01fc (diff) | |
Add API method to specialize function reference with argument types (#4966)
* Add `FunctionReflection::specializeWithArgTypes()`
* Update slang.cpp
* Use a shared semantics context on linkage
Improve performance on reflection queries
* Try to fix linux/mac compile errors
Diffstat (limited to 'include')
| -rw-r--r-- | include/slang.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/slang.h b/include/slang.h index 777cd406b..632bcbcbc 100644 --- a/include/slang.h +++ b/include/slang.h @@ -2589,6 +2589,7 @@ extern "C" SLANG_API SlangReflectionType* spReflectionFunction_GetResultType(SlangReflectionFunction* func); SLANG_API SlangReflectionGeneric* spReflectionFunction_GetGenericContainer(SlangReflectionFunction* func); SLANG_API SlangReflectionFunction* spReflectionFunction_applySpecializations(SlangReflectionFunction* func, SlangReflectionGeneric* generic); + SLANG_API SlangReflectionFunction* spReflectionFunction_specializeWithArgTypes(SlangReflectionFunction* func, SlangInt argTypeCount, SlangReflectionType* const* argTypes); // Abstract Decl Reflection @@ -3587,6 +3588,11 @@ namespace slang { return (FunctionReflection*)spReflectionFunction_applySpecializations((SlangReflectionFunction*)this, (SlangReflectionGeneric*)generic); } + + FunctionReflection* specializeWithArgTypes(unsigned int argCount, TypeReflection* const* types) + { + return (FunctionReflection*)spReflectionFunction_specializeWithArgTypes((SlangReflectionFunction*)this, argCount, (SlangReflectionType* const*)types); + } }; struct GenericReflection |
