From 643aaa13d2c6e0c4994437aa9fba6716787608ce Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 7 Jul 2023 14:26:37 -0700 Subject: Make DeclRefBase a Val, and DeclRef a helper class. (#2967) * Make DeclRefBase a Val, and DeclRef a helper class. * Fixes. * Workaround gcc parser issue. * Revert NodeOperand change. * Fix. * Fix clang incomplete class complains. * Fix code review. * Small cleanups and improvements. --------- Co-authored-by: Yong He --- source/slang/slang-ast-synthesis.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-ast-synthesis.cpp') diff --git a/source/slang/slang-ast-synthesis.cpp b/source/slang/slang-ast-synthesis.cpp index 5ad14321d..872088d54 100644 --- a/source/slang/slang-ast-synthesis.cpp +++ b/source/slang/slang-ast-synthesis.cpp @@ -59,7 +59,7 @@ Expr* ASTSynthesizer::emitVarExpr(Name* name) Expr* ASTSynthesizer::emitVarExpr(VarDecl* varDecl) { auto varExpr = m_builder->create(); - varExpr->declRef = makeDeclRef(varDecl); + varExpr->declRef = makeDeclRef(varDecl); varExpr->type = varDecl->type.type; return varExpr; } @@ -67,7 +67,7 @@ Expr* ASTSynthesizer::emitVarExpr(VarDecl* varDecl) Expr* ASTSynthesizer::emitVarExpr(VarDecl* var, Type* type) { auto expr = m_builder->create(); - expr->declRef = DeclRef(var); + expr->declRef = makeDeclRef(var); expr->type.type = type; expr->type.isLeftValue = true; return expr; @@ -76,7 +76,7 @@ Expr* ASTSynthesizer::emitVarExpr(VarDecl* var, Type* type) Expr* ASTSynthesizer::emitVarExpr(DeclStmt* varStmt, Type* type) { auto expr = m_builder->create(); - expr->declRef = DeclRef(as(varStmt->decl)); + expr->declRef = makeDeclRef(as(varStmt->decl)); expr->type.type = type; expr->type.isLeftValue = true; return expr; -- cgit v1.2.3