MCPcopy Create free account
hub / github.com/csmith-project/csmith / OutputDef

Method OutputDef

src/Variable.cpp:670–689  ·  view source on GitHub ↗

--------------------------------------------------------------

Source from the content-addressed store, hash-verified

668
669// --------------------------------------------------------------
670void
671Variable::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
691void Variable::OutputDecl(std::ostream &out) const
692{

Callers 4

output_varMethod · 0.45
rewrite_func_callMethod · 0.45
RandomOutputVarDefsMethod · 0.45
OutputVariableListFunction · 0.45

Calls 4

output_tabFunction · 0.85
output_comment_lineFunction · 0.85
outputlnFunction · 0.85
OutputMethod · 0.45

Tested by

no test coverage detected