From 6c7120d684cc46caafbe348d658158c0060a7638 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 5 Jul 2023 14:37:48 -0700 Subject: Bottleneck DeclRef creation through ASTBuilder. (#2689) * Bottleneck DeclRef creation through ASTBuilder. * Fix clang error. * Fix. * Fix. * More fix. * Rebase on top of tree. --------- Co-authored-by: Yong He --- source/slang/slang-ast-synthesis.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 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 bab651ed9..5ad14321d 100644 --- a/source/slang/slang-ast-synthesis.cpp +++ b/source/slang/slang-ast-synthesis.cpp @@ -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, nullptr); + expr->declRef = DeclRef(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), nullptr); + expr->declRef = DeclRef(as(varStmt->decl)); expr->type.type = type; expr->type.isLeftValue = true; return expr; -- cgit v1.2.3