summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-synthesis.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-08-04 15:47:39 -0700
committerGitHub <noreply@github.com>2023-08-04 15:47:39 -0700
commita2d90fb275962da84611160f8ddd74d934a68dbd (patch)
tree066084537b9f4fe1f367de100ed6638a88a028c1 /source/slang/slang-ast-synthesis.cpp
parent17da4f0dec2b86ba3a4bdaf8a2ae112047d23623 (diff)
Redesign `DeclRef` and systematic `Val` deduplication (#3049)
* Redesign DeclRef + Deduplicate Val. * Update project files * Fix warning. * Fix. * Fix. * Remove `Val::_equalsImplOverride`. * Rmove `Val::_getHashCodeOverride`. * Remove `semanticVisitor` param from `resolve`. * Cleanups. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ast-synthesis.cpp')
-rw-r--r--source/slang/slang-ast-synthesis.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/slang/slang-ast-synthesis.cpp b/source/slang/slang-ast-synthesis.cpp
index 65955e815..cb7d338c8 100644
--- a/source/slang/slang-ast-synthesis.cpp
+++ b/source/slang/slang-ast-synthesis.cpp
@@ -134,8 +134,7 @@ Expr* ASTSynthesizer::emitMemberExpr(Type* type, Name* name)
{
auto rs = m_builder->create<StaticMemberExpr>();
auto typeExpr = m_builder->create<SharedTypeExpr>();
- auto typetype = m_builder->create<TypeType>();
- typetype->type = type;
+ auto typetype = m_builder->getOrCreate<TypeType>(type);
typeExpr->type = typetype;
rs->baseExpression = typeExpr;
rs->name = name;