From 368f3b35d80dab573cbfd193fbf7d9697a9e0c70 Mon Sep 17 00:00:00 2001 From: PGZXB <420254146@qq.com> Date: Mon, 16 May 2022 11:17:09 +0800 Subject: [PATCH] [misc] Add ASTSerializer::visit(ReferenceExpression *) (#4984) --- taichi/analysis/gen_offline_cache_key.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/taichi/analysis/gen_offline_cache_key.cpp b/taichi/analysis/gen_offline_cache_key.cpp index 678076650e51a..bab660c68409b 100644 --- a/taichi/analysis/gen_offline_cache_key.cpp +++ b/taichi/analysis/gen_offline_cache_key.cpp @@ -236,6 +236,11 @@ class ASTSerializer : public IRVisitor, public ExpressionVisitor { emit(expr->conv_type); } + void visit(ReferenceExpression *expr) override { + emit(ExprOpCode::ReferenceExpression); + emit(expr->var); + } + void visit(Block *block) override { emit(StmtOpCode::EnterBlock); emit(static_cast(block->statements.size()));