Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
caesr-pub
systemc-clang
Commits
d1888682
Commit
d1888682
authored
Feb 15, 2019
by
rmrf
Browse files
TemplateType object should not use pointers in containers
parent
6e5991b5
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/FindPorts.cpp
View file @
d1888682
...
...
@@ -43,7 +43,7 @@ bool FindPorts::VisitFieldDecl(FieldDecl *fd) {
if
(
args
.
size
()
==
0
)
{
return
true
;
}
string
port_type
{
(
*
ait
)
->
getTypeName
()};
string
port_type
{
ait
->
getTypeName
()};
if
(
port_type
==
"sc_in"
)
{
// os_ << "\n+ sc_in";
_inPorts
.
insert
(
kvType
(
fname
,
te
));
...
...
src/FindSensitivity.cpp
View file @
d1888682
...
...
@@ -45,7 +45,7 @@ bool FindSensitivity::VisitMemberExpr(MemberExpr *e) {
return
true
;
/// Is it a port type
string
port_type
{
(
*
ait
)
->
getTypeName
()
};
string
port_type
{
ait
->
getTypeName
()
};
if
(
!
(
port_type
==
"sc_in"
||
port_type
==
"sc_out"
||
port_type
==
"sc_inout"
))
{
return
true
;
...
...
src/FindTLMInterfaces.cpp
View file @
d1888682
...
...
@@ -40,7 +40,7 @@ bool FindTLMInterfaces::VisitFieldDecl(FieldDecl *fd) {
}
// There could be more than one type though. Are you only referring to the first one?
string
template_type_name
{
(
*
ait
)
->
getTypeName
()
};
string
template_type_name
{
ait
->
getTypeName
()
};
if
(
template_type_name
==
"sc_fifo_in"
)
{
_inInterfaces
.
insert
(
kvType
(
fname
,
te
));
}
...
...
src/FindTemplateTypes.h
View file @
d1888682
...
...
@@ -20,7 +20,10 @@ namespace scpar {
class
TemplateType
{
public:
TemplateType
(
string
,
const
Type
*
);
string
getTypeName
();
~
TemplateType
(
);
TemplateType
(
const
TemplateType
&
);
string
getTypeName
()
const
;
const
Type
*
getTypePtr
();
private:
...
...
@@ -32,7 +35,7 @@ namespace scpar {
class
FindTemplateTypes
:
public
RecursiveASTVisitor
<
FindTemplateTypes
>
{
public:
/// Typedefs
typedef
TemplateType
*
TemplateTypePtr
;
typedef
TemplateType
TemplateTypePtr
;
//typedef vector< TemplateTypePtr > type_vector_t_new;
//typedef vector<pair<string, const Type *>> type_vector_t;
typedef
vector
<
TemplateTypePtr
>
type_vector_t
;
...
...
@@ -45,6 +48,8 @@ namespace scpar {
/// Copy constructor
FindTemplateTypes
(
const
FindTemplateTypes
&
rhs
);
FindTemplateTypes
(
const
FindTemplateTypes
*
rhs
);
~
FindTemplateTypes
();
string
getTemplateType
();
bool
VisitType
(
Type
*
type
);
bool
VisitIntegerLiteral
(
IntegerLiteral
*
l
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment