From 4c0a1b89e44891c9a25e907ba9f939e7280cb93f Mon Sep 17 00:00:00 2001 From: Maya Gokhale Date: Wed, 11 Dec 2019 10:02:27 -0800 Subject: [PATCH] added ddebug dump of types. added const qualifier to getTypePtr() in FindTemplateTypes due to compilation errors when referencing that method. --- plugins/xlat/Xlat.cpp | 4 +++- src/FindTemplateTypes.cpp | 2 +- src/FindTemplateTypes.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/xlat/Xlat.cpp b/plugins/xlat/Xlat.cpp index 97bb9e077..2e0a1ba9e 100644 --- a/plugins/xlat/Xlat.cpp +++ b/plugins/xlat/Xlat.cpp @@ -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_); } } diff --git a/src/FindTemplateTypes.cpp b/src/FindTemplateTypes.cpp index ff3a51699..99442b194 100644 --- a/src/FindTemplateTypes.cpp +++ b/src/FindTemplateTypes.cpp @@ -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 diff --git a/src/FindTemplateTypes.h b/src/FindTemplateTypes.h index 867168ef9..272a0731b 100644 --- a/src/FindTemplateTypes.h +++ b/src/FindTemplateTypes.h @@ -24,7 +24,7 @@ namespace scpar { TemplateType( const TemplateType& ); string getTypeName() const; - const Type* getTypePtr(); + const Type* getTypePtr() const; private: string type_name_;