Skip to content

Commit

Permalink
DEV: Added visit_DereferencePointer
Browse files Browse the repository at this point in the history
  • Loading branch information
czgdp1807 committed Feb 2, 2024
1 parent b3efc00 commit 4447aa9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/libasr/codegen/asr_to_llvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6520,12 +6520,21 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
}
}

void visit_Var(const ASR::Var_t &x) {
template <typename T>
void visit_SymbolContainingExpr(const T& x) {
ASR::Variable_t *v = ASR::down_cast<ASR::Variable_t>(
symbol_get_past_external(x.m_v));
fetch_var(v);
}

void visit_Var(const ASR::Var_t& x) {
visit_SymbolContainingExpr(x);
}

void visit_DereferencePointer(const ASR::DereferencePointer_t& x) {
visit_SymbolContainingExpr(x);
}

inline ASR::ttype_t* extract_ttype_t_from_expr(ASR::expr_t* expr) {
return ASRUtils::expr_type(expr);
}
Expand Down

0 comments on commit 4447aa9

Please sign in to comment.