diff options
Diffstat (limited to 'tools/slang-reflection-test/main.cpp')
| -rw-r--r-- | tools/slang-reflection-test/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/slang-reflection-test/main.cpp b/tools/slang-reflection-test/main.cpp index f604ca1aa..b0d970ba3 100644 --- a/tools/slang-reflection-test/main.cpp +++ b/tools/slang-reflection-test/main.cpp @@ -460,11 +460,17 @@ static void emitReflectionTypeLayoutInfoJSON( case slang::TypeReflection::Kind::Struct: { + auto structTypeLayout = typeLayout; + write(writer, "\"kind\": \"struct\",\n"); + if( auto name = structTypeLayout->getName() ) + { + emitReflectionNameInfoJSON(writer, structTypeLayout->getName()); + write(writer, ",\n"); + } write(writer, "\"fields\": [\n"); indent(writer); - auto structTypeLayout = typeLayout; auto fieldCount = structTypeLayout->getFieldCount(); for( uint32_t ff = 0; ff < fieldCount; ++ff ) { |
