summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-08-06 01:07:41 -0700
committerGitHub <noreply@github.com>2025-08-06 08:07:41 +0000
commit68b0125226464cb3c9e9b7f50bfb53cda97723b4 (patch)
tree5f0833c6d9aa759b2769f7f6ac9b3ca6ed9a10f0 /include
parent83675103a1a4fefde11b314aed26f4d37860efe7 (diff)
Add reflection api for overload candidate filtering. (#8066)
* Add reflection api for overload candidate filtering. * Fix API. * Fix. * Update build. * Update test. * Update formatting.
Diffstat (limited to 'include')
-rw-r--r--include/slang-deprecated.h4
-rw-r--r--include/slang.h16
2 files changed, 20 insertions, 0 deletions
diff --git a/include/slang-deprecated.h b/include/slang-deprecated.h
index f210e8c48..32db65007 100644
--- a/include/slang-deprecated.h
+++ b/include/slang-deprecated.h
@@ -904,6 +904,10 @@ extern "C"
SlangReflection* reflection,
SlangReflectionType* reflType,
char const* name);
+ SLANG_API SlangReflectionFunction* spReflection_TryResolveOverloadedFunction(
+ SlangReflection* reflection,
+ uint32_t candidateCount,
+ SlangReflectionFunction** candidates);
SLANG_API SlangUInt spReflection_getEntryPointCount(SlangReflection* reflection);
SLANG_API SlangReflectionEntryPoint* spReflection_getEntryPointByIndex(
diff --git a/include/slang.h b/include/slang.h
index 65449a1ff..7462644a2 100644
--- a/include/slang.h
+++ b/include/slang.h
@@ -502,6 +502,12 @@ convention for interface methods.
#include <stddef.h>
#endif // ! SLANG_NO_STDDEF
+#ifdef SLANG_NO_DEPRECATION
+ #define SLANG_DEPRECATED
+#else
+ #define SLANG_DEPRECATED [[deprecated]]
+#endif
+
#ifdef __cplusplus
extern "C"
{
@@ -3345,6 +3351,16 @@ struct ShaderReflection
name);
}
+ SLANG_DEPRECATED FunctionReflection* tryResolveOverloadedFunction(
+ uint32_t candidateCount,
+ FunctionReflection** candidates)
+ {
+ return (FunctionReflection*)spReflection_TryResolveOverloadedFunction(
+ (SlangReflection*)this,
+ candidateCount,
+ (SlangReflectionFunction**)candidates);
+ }
+
VariableReflection* findVarByNameInType(TypeReflection* type, const char* name)
{
return (VariableReflection*)spReflection_FindVarByNameInType(