Skip to content

Commit

Permalink
ASRUtils: also print type name along with symbol name
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed May 13, 2023
1 parent c85d000 commit 7f7dbde
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libasr/asr_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -1192,15 +1192,15 @@ static inline std::string type_to_str_python(const ASR::ttype_t *t,
}
case ASR::ttypeType::Struct: {
ASR::Struct_t* d = ASR::down_cast<ASR::Struct_t>(t);
return symbol_name(d->m_derived_type);
return "struct " + std::string(symbol_name(d->m_derived_type));
}
case ASR::ttypeType::Enum: {
ASR::Enum_t* d = ASR::down_cast<ASR::Enum_t>(t);
return symbol_name(d->m_enum_type);
return "enum " + std::string(symbol_name(d->m_enum_type));
}
case ASR::ttypeType::Union: {
ASR::Union_t* d = ASR::down_cast<ASR::Union_t>(t);
return symbol_name(d->m_union_type);
return "union " + std::string(symbol_name(d->m_union_type));
}
case ASR::ttypeType::Pointer: {
ASR::Pointer_t* p = ASR::down_cast<ASR::Pointer_t>(t);
Expand Down

0 comments on commit 7f7dbde

Please sign in to comment.