summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/slang-deprecated.h3
-rw-r--r--include/slang.h7
2 files changed, 10 insertions, 0 deletions
diff --git a/include/slang-deprecated.h b/include/slang-deprecated.h
index c81ae8537..026845888 100644
--- a/include/slang-deprecated.h
+++ b/include/slang-deprecated.h
@@ -750,6 +750,9 @@ extern "C"
SLANG_API SlangReflectionGeneric* spReflectionDecl_castToGeneric(SlangReflectionDecl* decl);
SLANG_API SlangReflectionType* spReflection_getTypeFromDecl(SlangReflectionDecl* decl);
SLANG_API SlangReflectionDecl* spReflectionDecl_getParent(SlangReflectionDecl* decl);
+ SLANG_API SlangReflectionModifier* spReflectionDecl_findModifier(
+ SlangReflectionDecl* decl,
+ SlangModifierID modifierID);
// Generic Reflection
diff --git a/include/slang.h b/include/slang.h
index a3d979de5..a3ed2112a 100644
--- a/include/slang.h
+++ b/include/slang.h
@@ -3518,6 +3518,13 @@ struct DeclReflection
return (DeclReflection*)spReflectionDecl_getParent((SlangReflectionDecl*)this);
}
+ Modifier* findModifier(Modifier::ID id)
+ {
+ return (Modifier*)spReflectionDecl_findModifier(
+ (SlangReflectionDecl*)this,
+ (SlangModifierID)id);
+ }
+
template<Kind K>
struct FilteredList
{