diff options
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -201,7 +201,10 @@ buildobj(struct input *input, char *output, enum phaseid last) if (fd < 0) fatal("mkstemp:"); close(fd); - } else if (!output && last != PREPROCESS) { + } else if (output) { + if (strcmp(output, "-") == 0) + output = NULL; + } else if (last != PREPROCESS) { switch (last) { case COMPILE: ext = "qbe"; break; case CODEGEN: ext = "s"; break; @@ -211,8 +214,6 @@ buildobj(struct input *input, char *output, enum phaseid last) } if (strcmp(input->name, "-") == 0) input->name = NULL; - if (strcmp(output, "-") == 0) - output = NULL; npids = 0; for (i = first, fd = -1, phaseoutput = NULL; i <= last; ++i, ++npids) { |