--------------------------------------------------------------
| 668 | |
| 669 | // -------------------------------------------------------------- |
| 670 | void |
| 671 | Variable::OutputDef(std::ostream &out, int indent) const |
| 672 | { |
| 673 | output_tab(out, indent); |
| 674 | // force global variables to be static if necessary |
| 675 | if (CGOptions::force_globals_static() && is_global()) { |
| 676 | out << "static "; |
| 677 | } |
| 678 | output_qualified_type(out); |
| 679 | out << get_actual_name() << " = "; |
| 680 | assert(init); |
| 681 | init->Output(out); |
| 682 | out << ";"; |
| 683 | if (is_volatile()) { |
| 684 | string comment = "VOLATILE GLOBAL " + get_actual_name(); |
| 685 | output_comment_line(out, comment); |
| 686 | } else { |
| 687 | outputln(out); |
| 688 | } |
| 689 | } |
| 690 | |
| 691 | void Variable::OutputDecl(std::ostream &out) const |
| 692 | { |
no test coverage detected