Don't bother emitting else part if it's empty
This commit is contained in:
parent
8d0afa632d
commit
ae0b09dd3a
|
|
@ -631,8 +631,10 @@ void vhdl_if_stmt::emit(std::ofstream &of, int level) const
|
|||
test_->emit(of, level);
|
||||
of << " then";
|
||||
then_part_.emit(of, level);
|
||||
of << "else";
|
||||
else_part_.emit(of, level);
|
||||
if (!else_part_.empty()) {
|
||||
of << "else";
|
||||
else_part_.emit(of, level);
|
||||
}
|
||||
of << "end if;";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue