1#ifndef _PORT_BINDING_H_
2#define _PORT_BINDING_H_
112 auto is_int_lit{clang::dyn_cast<clang::IntegerLiteral>(sub)};
113 auto is_dref_expr{clang::dyn_cast<clang::DeclRefExpr>(sub)};
121 return_str +=
" " + is_dref_expr->getNameInfo().getName().getAsString();
131 auto is_int_lit{clang::dyn_cast<clang::IntegerLiteral>(sub)};
132 auto is_dref_expr{clang::dyn_cast<clang::DeclRefExpr>(sub)};
140 return_str +=
" " + is_dref_expr->getNameInfo().getName().getAsString();
149 auto is_int_lit{clang::dyn_cast<clang::IntegerLiteral>(sub)};
150 auto is_dref_expr{clang::dyn_cast<clang::DeclRefExpr>(sub)};
158 return_str +=
" " + is_dref_expr->getNameInfo().getName().getAsString();
176 auto int_lit{clang::dyn_cast<clang::IntegerLiteral>(sub)};
178 llvm::outs() <<
" " << int_lit->getValue();
181 auto decl_ref_expr{clang::dyn_cast<clang::DeclRefExpr>(sub)};
184 << decl_ref_expr->getNameInfo().getName().getAsString();
188 llvm::outs() <<
"\n";
193 auto int_lit{clang::dyn_cast<clang::IntegerLiteral>(sub)};
195 llvm::outs() <<
" " << int_lit->getValue();
198 auto decl_ref_expr{clang::dyn_cast<clang::DeclRefExpr>(sub)};
201 << decl_ref_expr->getNameInfo().getName().getAsString();
205 llvm::outs() <<
"\nCALLEE\n"
210 auto int_lit{clang::dyn_cast<clang::IntegerLiteral>(sub)};
212 llvm::outs() <<
" " << int_lit->getValue();
215 auto decl_ref_expr{clang::dyn_cast<clang::DeclRefExpr>(sub)};
218 << decl_ref_expr->getNameInfo().getName().getAsString();
222 llvm::outs() <<
"\n";
230 PortBinding(clang::Expr *caller_expr, clang::Expr *caller_port_expr,
231 clang::MemberExpr *caller_port_me_expr, clang::Expr *callee_expr,
232 clang::MemberExpr *callee_port_me_expr)
241 LLVM_DEBUG(llvm::dbgs() <<
"==> Extract caller port name\n";);
266 llvm::dbgs() <<
"========= CALLER ME EXPR ======== \n";
271 .getBaseTypeIdentifier()
275 LLVM_DEBUG(llvm::dbgs() <<
"==> Extract callee port name\n";);
288 LLVM_DEBUG(llvm::dbgs() <<
"extract callee name\n";);
const clang::Expr * caller_expr_
Caller.
ArraySubscriptsExprType callee_array_subscripts_
const std::string getCalleePortName() const
const std::string getCalleeInstanceName() const
const std::string & getPortName() const
std::string caller_instance_type_name_
const clang::ArraySubscriptExpr * caller_array_expr_
std::string instance_constructor_name_
std::string instance_type_
const std::string getCallerInstanceTypeName() const
const std::string toString() const
const clang::MemberExpr * callee_instance_me_expr_
PortBinding(clang::Expr *caller_expr, clang::Expr *caller_port_expr, clang::MemberExpr *caller_port_me_expr, clang::Expr *callee_expr, clang::MemberExpr *callee_port_me_expr)
const clang::MemberExpr * callee_port_me_expr_
const std::string getCallerInstanceName() const
const clang::Expr * callee_expr_
Callee.
void setInstanceConstructorName(const std::string &name)
std::vector< const clang::Expr * > ArraySubscriptsExprType
std::string caller_instance_name_
We no longer support sc_main parsing.
ArraySubscriptsExprType caller_port_array_subscripts_
const clang::Expr * caller_port_array_expr_
ArraySubscriptsExprType getCalleeArraySubscripts() const
std::string callee_port_name_
const std::string & getInstanceType() const
const clang::CXXRecordDecl * instance_type_decl_
const std::string & getInstanceConstructorName() const
std::string callee_type_name_
std::string callee_instance_name_
const clang::ArraySubscriptExpr * callee_array_expr_
const std::string & getInstanceVarName() const
ArraySubscriptsExprType caller_array_subscripts_
const clang::MemberExpr * caller_port_me_expr_
ArraySubscriptsExprType getCallerArraySubscripts() const
void setInstanceVarName(const std::string &name)
std::string caller_port_name_
const clang::CXXRecordDecl * getInstanceTypeDecl() const
ArraySubscriptsExprType getCallerPortArraySubscripts() const
const clang::MemberExpr * caller_instance_me_expr_
const std::string getCallerPortName() const
const clang::MemberExpr * getCallerMemberExpr() const
std::string instance_var_name_
ArraySizesExprType getArraySubscripts(const clang::Expr *expr)
const clang::MemberExpr * getArrayMemberExprName(const clang::Expr *expr)
std::string toString(const T &i)