summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-compiler.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-01-31 16:26:03 -0800
committerGitHub <noreply@github.com>2022-01-31 16:26:03 -0800
commite59516fa8c3a16eb7b99a928c5b85b97bf44fd72 (patch)
tree869c2b8df0cc0d368af928324d53079a9f7999e0 /source/slang/slang-compiler.cpp
parent2bb43bbe4709533e0c6e53df1c62d368132dcd73 (diff)
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 <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-compiler.cpp')
-rw-r--r--source/slang/slang-compiler.cpp2
1 files changed, 1 insertions, 1 deletions
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)