Don't generate any output if there were errors
This commit is contained in:
parent
f49dd97d24
commit
234f73e7bf
|
|
@ -85,16 +85,19 @@ extern "C" int target_design(ivl_design_t des)
|
||||||
ivl_design_process(des, draw_process, NULL);
|
ivl_design_process(des, draw_process, NULL);
|
||||||
|
|
||||||
// Write the generated elements to the output file
|
// Write the generated elements to the output file
|
||||||
const char *ofname = ivl_design_flag(des, "-o");
|
// only if there are no errors
|
||||||
std::ofstream outfile(ofname);
|
if (0 == g_errors) {
|
||||||
|
const char *ofname = ivl_design_flag(des, "-o");
|
||||||
for (entity_list_t::iterator it = g_entities.begin();
|
std::ofstream outfile(ofname);
|
||||||
it != g_entities.end();
|
|
||||||
++it)
|
for (entity_list_t::iterator it = g_entities.begin();
|
||||||
(*it)->emit(outfile);
|
it != g_entities.end();
|
||||||
|
++it)
|
||||||
|
(*it)->emit(outfile);
|
||||||
|
|
||||||
|
outfile.close();
|
||||||
|
}
|
||||||
|
|
||||||
outfile.close();
|
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
for (entity_list_t::iterator it = g_entities.begin();
|
for (entity_list_t::iterator it = g_entities.begin();
|
||||||
it != g_entities.end();
|
it != g_entities.end();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue