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 @@ -653,13 +653,25 @@ class verilog_blockt:public verilog_statementt
653
653
verilog_blockt ():verilog_statementt(ID_block)
654
654
{
655
655
}
656
-
657
- inline irep_idt get_identifier () const
656
+
657
+ using statementst = std::vector<verilog_statementt>;
658
+
659
+ statementst &statements ()
660
+ {
661
+ return (statementst &)operands ();
662
+ }
663
+
664
+ const statementst &statements () const
665
+ {
666
+ return (const statementst &)operands ();
667
+ }
668
+
669
+ irep_idt identifier () const
658
670
{
659
671
return get (ID_identifier);
660
672
}
661
-
662
- inline bool is_named () const
673
+
674
+ bool is_named () const
663
675
{
664
676
return !get (ID_identifier).empty ();
665
677
}
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 @@ -757,11 +757,11 @@ void verilog_typecheckt::convert_block(verilog_blockt &statement)
757
757
bool is_named=statement.is_named ();
758
758
759
759
if (is_named)
760
- enter_named_block (statement.get_identifier ());
760
+ enter_named_block (statement.identifier ());
761
+
762
+ for (auto &block_statement : statement.statements ())
763
+ convert_statement (block_statement);
761
764
762
- Forall_operands (it, statement)
763
- convert_statement (to_verilog_statement (*it));
764
-
765
765
if (is_named)
766
766
named_blocks.pop_back ();
767
767
}
You can’t perform that action at this time.
0 commit comments