mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
Don't create a (empty) output file, and don't warn about bitcode output
to a console, when --analyze is used. Similarly, avoid creating an empty output file when --disable-output is used. Print a warning when the -o option appears with either --analyze or --disable-output, to indicate that the option is being ignored. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93685 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -373,6 +373,10 @@ int main(int argc, char **argv) {
|
|||||||
// FIXME: outs() is not binary!
|
// FIXME: outs() is not binary!
|
||||||
raw_ostream *Out = &outs(); // Default to printing to stdout...
|
raw_ostream *Out = &outs(); // Default to printing to stdout...
|
||||||
if (OutputFilename != "-") {
|
if (OutputFilename != "-") {
|
||||||
|
if (NoOutput || AnalyzeOnly) {
|
||||||
|
errs() << "WARNING: The -o (output filename) option is ignored when\n"
|
||||||
|
"the --disable-output or --analyze options are used.\n";
|
||||||
|
} else {
|
||||||
// Make sure that the Output file gets unlinked from the disk if we get a
|
// Make sure that the Output file gets unlinked from the disk if we get a
|
||||||
// SIGINT
|
// SIGINT
|
||||||
sys::RemoveFileOnSignal(sys::Path(OutputFilename));
|
sys::RemoveFileOnSignal(sys::Path(OutputFilename));
|
||||||
@ -386,11 +390,12 @@ int main(int argc, char **argv) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the output is set to be emitted to standard out, and standard out is a
|
// If the output is set to be emitted to standard out, and standard out is a
|
||||||
// console, print out a warning message and refuse to do it. We don't
|
// console, print out a warning message and refuse to do it. We don't
|
||||||
// impress anyone by spewing tons of binary goo to a terminal.
|
// impress anyone by spewing tons of binary goo to a terminal.
|
||||||
if (!Force && !NoOutput && !OutputAssembly)
|
if (!Force && !NoOutput && !AnalyzeOnly && !OutputAssembly)
|
||||||
if (CheckBitcodeOutputToConsole(*Out, !Quiet))
|
if (CheckBitcodeOutputToConsole(*Out, !Quiet))
|
||||||
NoOutput = true;
|
NoOutput = true;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user