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

@@ -389,7 +389,13 @@ Globals::Globals() {
// SourcePos
SourcePos::SourcePos(const char *n, int fl, int fc, int ll, int lc) {
name = n ? n : m->module->getModuleIdentifier().c_str();
name = n;
if (name == NULL) {
if (m != NULL)
name = m->module->getModuleIdentifier().c_str();
else
name = "(unknown)";
}
first_line = fl;
first_column = fc;
last_line = ll != 0 ? ll : fl;