File tree Expand file tree Collapse file tree 4 files changed +26
-15
lines changed Expand file tree Collapse file tree 4 files changed +26
-15
lines changed Original file line number Diff line number Diff line change @@ -648,13 +648,25 @@ class verilog_blockt:public verilog_statementt
648
648
verilog_blockt ():verilog_statementt(ID_block)
649
649
{
650
650
}
651
-
652
- inline irep_idt get_identifier () const
651
+
652
+ using statementst = std::vector<verilog_statementt>;
653
+
654
+ statementst &statements ()
655
+ {
656
+ return (statementst &)operands ();
657
+ }
658
+
659
+ const statementst &statements () const
660
+ {
661
+ return (const statementst &)operands ();
662
+ }
663
+
664
+ irep_idt identifier () const
653
665
{
654
666
return get (ID_identifier);
655
667
}
656
-
657
- inline bool is_named () const
668
+
669
+ bool is_named () const
658
670
{
659
671
return !get (ID_identifier).empty ();
660
672
}
Original file line number Diff line number Diff line change @@ -857,8 +857,8 @@ void verilog_typecheckt::interface_block(
857
857
858
858
if (is_named)
859
859
{
860
- irep_idt identifier= statement.get_identifier ();
861
-
860
+ irep_idt identifier = statement.identifier ();
861
+
862
862
// need to add to symbol table
863
863
symbolt symbol;
864
864
@@ -892,9 +892,8 @@ void verilog_typecheckt::interface_block(
892
892
893
893
// do block itself
894
894
895
- forall_operands (it, statement)
896
- interface_statement (
897
- static_cast <const verilog_statementt &>(*it));
895
+ for (auto &block_statement : statement.statements ())
896
+ interface_statement (block_statement);
898
897
899
898
if (is_named)
900
899
named_blocks.pop_back ();
Original file line number Diff line number Diff line change @@ -1570,8 +1570,8 @@ Function: verilog_synthesist::synth_block
1570
1570
1571
1571
void verilog_synthesist::synth_block (const verilog_blockt &statement)
1572
1572
{
1573
- forall_operands (it, statement)
1574
- synth_statement (static_cast < const verilog_statementt &>(*it) );
1573
+ for ( auto &block_statement : statement. statements () )
1574
+ synth_statement (block_statement );
1575
1575
}
1576
1576
1577
1577
/* ******************************************************************\
Original file line number Diff line number Diff line change @@ -778,11 +778,11 @@ void verilog_typecheckt::convert_block(verilog_blockt &statement)
778
778
bool is_named=statement.is_named ();
779
779
780
780
if (is_named)
781
- enter_named_block (statement.get_identifier ());
781
+ enter_named_block (statement.identifier ());
782
+
783
+ for (auto &block_statement : statement.statements ())
784
+ convert_statement (block_statement);
782
785
783
- Forall_operands (it, statement)
784
- convert_statement (to_verilog_statement (*it));
785
-
786
786
if (is_named)
787
787
named_blocks.pop_back ();
788
788
}
You can’t perform that action at this time.
0 commit comments