Switch a few remaining fprintf() calls to use Warning()/Error().
This commit is contained in:
10
ispc.cpp
10
ispc.cpp
@@ -140,16 +140,16 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa,
|
|||||||
isa = "sse4";
|
isa = "sse4";
|
||||||
else
|
else
|
||||||
isa = "sse2";
|
isa = "sse2";
|
||||||
fprintf(stderr, "Notice: no --target specified on command-line. "
|
Warning(SourcePos(), "No --target specified on command-line. "
|
||||||
"Using ISA \"%s\" based on specified CPU \"%s\".\n", isa,
|
"Using ISA \"%s\" based on specified CPU \"%s\".", isa,
|
||||||
cpu);
|
cpu);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// No CPU and no ISA, so use CPUID to figure out what this CPU
|
// No CPU and no ISA, so use CPUID to figure out what this CPU
|
||||||
// supports.
|
// supports.
|
||||||
isa = lGetSystemISA();
|
isa = lGetSystemISA();
|
||||||
fprintf(stderr, "Notice: no --target specified on command-line. "
|
Warning(SourcePos(), "No --target specified on command-line. "
|
||||||
"Using system ISA \"%s\".\n", isa);
|
"Using system ISA \"%s\".", isa);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa,
|
|||||||
if (hostCPU.size() > 0)
|
if (hostCPU.size() > 0)
|
||||||
cpu = strdup(hostCPU.c_str());
|
cpu = strdup(hostCPU.c_str());
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, "Warning: unable to determine host CPU!\n");
|
Warning(SourcePos(), "Unable to determine host CPU!\n");
|
||||||
cpu = "generic";
|
cpu = "generic";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -924,8 +924,8 @@ Module::writeOutput(OutputType outputType, const char *outFileName,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (fileType != NULL)
|
if (fileType != NULL)
|
||||||
fprintf(stderr, "Warning: emitting %s file, but filename \"%s\" "
|
Warning(SourcePos(), "Warning: emitting %s file, but filename \"%s\" "
|
||||||
"has suffix \"%s\"?\n", fileType, outFileName, suffix);
|
"has suffix \"%s\"?", fileType, outFileName, suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (outputType == Header)
|
if (outputType == Header)
|
||||||
|
|||||||
Reference in New Issue
Block a user