summaryrefslogtreecommitdiffstats
path: root/source/slang/reflection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/reflection.cpp')
-rw-r--r--source/slang/reflection.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp
index 220e5bcdf..89fd94093 100644
--- a/source/slang/reflection.cpp
+++ b/source/slang/reflection.cpp
@@ -135,7 +135,7 @@ SLANG_API SlangTypeKind spReflectionType_GetKind(SlangReflectionType* inType)
else if( auto declRefType = type->As<DeclRefType>() )
{
auto declRef = declRefType->declRef;
- if( auto structDeclRef = declRef.As<StructDeclRef>() )
+ if( auto structDeclRef = declRef.As<StructSyntaxNode>() )
{
return SLANG_TYPE_KIND_STRUCT;
}
@@ -155,9 +155,9 @@ SLANG_API unsigned int spReflectionType_GetFieldCount(SlangReflectionType* inTyp
if(auto declRefType = dynamic_cast<DeclRefType*>(type))
{
auto declRef = declRefType->declRef;
- if( auto structDeclRef = declRef.As<StructDeclRef>())
+ if( auto structDeclRef = declRef.As<StructSyntaxNode>())
{
- return structDeclRef.GetFields().Count();
+ return GetFields(structDeclRef).Count();
}
}
@@ -174,10 +174,10 @@ SLANG_API SlangReflectionVariable* spReflectionType_GetFieldByIndex(SlangReflect
if(auto declRefType = dynamic_cast<DeclRefType*>(type))
{
auto declRef = declRefType->declRef;
- if( auto structDeclRef = declRef.As<StructDeclRef>())
+ if( auto structDeclRef = declRef.As<StructSyntaxNode>())
{
- auto fieldDeclRef = structDeclRef.GetFields().ToArray()[index];
- return (SlangReflectionVariable*) fieldDeclRef.GetDecl();
+ auto fieldDeclRef = GetFields(structDeclRef).ToArray()[index];
+ return (SlangReflectionVariable*) fieldDeclRef.getDecl();
}
}
@@ -573,7 +573,7 @@ SLANG_API SlangReflectionVariable* spReflectionVariableLayout_GetVariable(SlangR
auto varLayout = convert(inVarLayout);
if(!varLayout) return nullptr;
- return convert(varLayout->varDecl.GetDecl());
+ return convert(varLayout->varDecl.getDecl());
}
SLANG_API SlangReflectionTypeLayout* spReflectionVariableLayout_GetTypeLayout(SlangReflectionVariableLayout* inVarLayout)