Issue a warning if no output file is specified.

This commit is contained in:
Matt Pharr
2011-12-05 17:07:59 -08:00
parent 765d86076f
commit 9475e13d81
3 changed files with 15 additions and 3 deletions

View File

@@ -37,6 +37,7 @@
#include "ispc.h"
#include "module.h"
#include "util.h"
#include <stdio.h>
#include <stdlib.h>
#include <llvm/Support/PrettyStackTrace.h>
@@ -354,6 +355,11 @@ int main(int Argc, char *Argv[]) {
if (debugSet && !optSet)
g->opt.level = 0;
if (outFileName == NULL && headerFileName == NULL)
Warning(SourcePos(), "Warning: no output file or header file name "
"specified. Program will be compiled and warnings/errors will "
"be issued, but no output will be generated.");
return Module::CompileAndOutput(file, arch, cpu, target, generatePIC,
ot, outFileName, headerFileName);
}