From e59516fa8c3a16eb7b99a928c5b85b97bf44fd72 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 31 Jan 2022 16:26:03 -0800 Subject: Revise entrypoint renaming interface. (#2113) Changed the interface from `IEntryPoint::getRenamedEntryPoint` to `IComponentType::renameEntryPoint`. The underlying implementation creates a `RenamedEntryPointComponentType` wrapper object around the base entry-point. This new implementation allows the user to specify entry point renaming on an IComponentType that isn't just a `EntryPoint`, but also on `SpecializedComponentType` or `CompositeComponentType` as long as the component defines a single entry point. Co-authored-by: Yong He --- source/slang/slang-compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-compiler.cpp') diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index d90e9b102..0e2f339a9 100644 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -287,7 +287,7 @@ namespace Slang SLANG_UNUSED(index); SLANG_ASSERT(index == 0); - return m_nameOverride; + return m_name ? m_name->text : ""; } void EntryPoint::acceptVisitor(ComponentTypeVisitor* visitor, SpecializationInfo* specializationInfo) -- cgit v1.2.3