Skip to content

Commit

Permalink
added ddebug dump of types.
Browse files Browse the repository at this point in the history
added const qualifier to getTypePtr() in FindTemplateTypes due to
compilation errors when referencing that method.
  • Loading branch information
mayagokhale committed Dec 11, 2019
1 parent bf71252 commit 4c0a1b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion plugins/xlat/Xlat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,15 @@ void Xlat::xlatsig(ModuleDecl::signalMapType pmap, hNode::hdlopsEnum h_op,
}

void Xlat::xlattype(FindTemplateTypes *tt, hNodep &h_typeinfo) {
// tt->printTemplateArguments(os, 1);
//tt->printTemplateArguments(os_);

scpar::FindTemplateTypes::type_vector_t ttargs =
tt->getTemplateArgumentsType();
for (auto const &targ : ttargs) {
h_typeinfo->child_list.push_back(
new hNode(targ.getTypeName(), hNode::hdlopsEnum::hType));
const Type * tmpptr = targ.getTypePtr();
(targ.getTypePtr())->dump(os_);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/FindTemplateTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TemplateType::~TemplateType() { type_ptr_ = nullptr; }

string TemplateType::getTypeName() const { return type_name_; }

const Type *TemplateType::getTypePtr() { return type_ptr_; }
const Type *TemplateType::getTypePtr() const { return type_ptr_; }

//////////////////////////////////////////////////////////////////////
// FindTemplateTypes
Expand Down
2 changes: 1 addition & 1 deletion src/FindTemplateTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace scpar {
TemplateType( const TemplateType& );

string getTypeName() const;
const Type* getTypePtr();
const Type* getTypePtr() const;

private:
string type_name_;
Expand Down

0 comments on commit 4c0a1b8

Please sign in to comment.