vhdlpp: SigVarBase::peek_name_() method made public.

This commit is contained in:
Maciej Suminski 2015-01-23 12:13:56 +01:00
parent d4dd635bf6
commit 56e410f386
2 changed files with 4 additions and 3 deletions

View File

@ -54,7 +54,7 @@ int Signal::emit(ostream&out, Entity*ent, Architecture*arc)
type_elaborate_(decl); type_elaborate_(decl);
if (peek_refcnt_sequ_() > 0 || !peek_type()->can_be_packed()) if (peek_refcnt_sequ_() > 0 || !peek_type()->can_be_packed())
decl.reg_flag = true; decl.reg_flag = true;
errors += decl.emit(out, peek_name_()); errors += decl.emit(out, peek_name());
Expression*init_expr = peek_init_expr(); Expression*init_expr = peek_init_expr();
if (init_expr) { if (init_expr) {
@ -73,7 +73,7 @@ int Variable::emit(ostream&out, Entity*, Architecture*)
type_elaborate_(decl); type_elaborate_(decl);
if (peek_refcnt_sequ_() > 0 || !peek_type()->can_be_packed()) if (peek_refcnt_sequ_() > 0 || !peek_type()->can_be_packed())
decl.reg_flag = true; decl.reg_flag = true;
errors += decl.emit(out, peek_name_()); errors += decl.emit(out, peek_name());
out << ";" << endl; out << ";" << endl;
return errors; return errors;
} }

View File

@ -44,8 +44,9 @@ class SigVarBase : public LineInfo {
// Elaborates initializer expressions if needed. // Elaborates initializer expressions if needed.
void elaborate_init_expr(Entity*ent, Architecture*arc); void elaborate_init_expr(Entity*ent, Architecture*arc);
perm_string peek_name() const { return name_; }
protected: protected:
perm_string peek_name_() const { return name_; }
unsigned peek_refcnt_sequ_() const { return refcnt_sequ_; } unsigned peek_refcnt_sequ_() const { return refcnt_sequ_; }
void type_elaborate_(VType::decl_t&decl); void type_elaborate_(VType::decl_t&decl);