From 888912dbe01c715aa5a0ddec19da6ef12f382ebf Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 22 Jan 2002 21:07:24 +0000 Subject: [PATCH] In an amazing fit of stupidity, I flipped the conditional and didn't test it right. Sheesh :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1550 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/as/as.cpp | 4 ++-- tools/dis/dis.cpp | 4 ++-- tools/link/link.cpp | 2 +- tools/llc/llc.cpp | 6 +++--- tools/llvm-as/as.cpp | 4 ++-- tools/llvm-as/llvm-as.cpp | 4 ++-- tools/llvm-dis/dis.cpp | 4 ++-- tools/llvm-dis/llvm-dis.cpp | 4 ++-- tools/llvm-link/llvm-link.cpp | 2 +- tools/opt/opt.cpp | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tools/as/as.cpp b/tools/as/as.cpp index 0fbd1e6cd41..59049748354 100644 --- a/tools/as/as.cpp +++ b/tools/as/as.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv) { cerr << "Here's the assembly:\n" << C.get(); if (OutputFilename != "") { // Specified an output filename? - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; @@ -61,7 +61,7 @@ int main(int argc, char **argv) { } OutputFilename += ".bc"; - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; diff --git a/tools/dis/dis.cpp b/tools/dis/dis.cpp index 55e8d5d6690..11e67c4fe8b 100644 --- a/tools/dis/dis.cpp +++ b/tools/dis/dis.cpp @@ -58,7 +58,7 @@ int main(int argc, char **argv) { } if (OutputFilename != "") { // Specified an output filename? - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists! Sending to standard output.\n"; @@ -79,7 +79,7 @@ int main(int argc, char **argv) { } OutputFilename += ".ll"; - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists! Sending to standard output.\n"; diff --git a/tools/link/link.cpp b/tools/link/link.cpp index db21db06544..4f7530ced3e 100644 --- a/tools/link/link.cpp +++ b/tools/link/link.cpp @@ -111,7 +111,7 @@ int main(int argc, char **argv) { ostream *Out = &cout; // Default to printing to stdout... if (OutputFilename != "-") { - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 1d63b28b3a2..1e7defa7941 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -136,7 +136,7 @@ int main(int argc, char **argv) { "files on stdin not supported with tracing"); string traceFileName = GetFileNameRoot(InputFilename) + ".trace.bc"; - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; @@ -170,7 +170,7 @@ int main(int argc, char **argv) { // Figure out where we are going to send the output... std::ostream *Out = 0; if (OutputFilename != "") { // Specified an output filename? - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; @@ -185,7 +185,7 @@ int main(int argc, char **argv) { string OutputFilename = GetFileNameRoot(InputFilename); OutputFilename += ".s"; - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; diff --git a/tools/llvm-as/as.cpp b/tools/llvm-as/as.cpp index 0fbd1e6cd41..59049748354 100644 --- a/tools/llvm-as/as.cpp +++ b/tools/llvm-as/as.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv) { cerr << "Here's the assembly:\n" << C.get(); if (OutputFilename != "") { // Specified an output filename? - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; @@ -61,7 +61,7 @@ int main(int argc, char **argv) { } OutputFilename += ".bc"; - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index 0fbd1e6cd41..59049748354 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv) { cerr << "Here's the assembly:\n" << C.get(); if (OutputFilename != "") { // Specified an output filename? - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; @@ -61,7 +61,7 @@ int main(int argc, char **argv) { } OutputFilename += ".bc"; - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; diff --git a/tools/llvm-dis/dis.cpp b/tools/llvm-dis/dis.cpp index 55e8d5d6690..11e67c4fe8b 100644 --- a/tools/llvm-dis/dis.cpp +++ b/tools/llvm-dis/dis.cpp @@ -58,7 +58,7 @@ int main(int argc, char **argv) { } if (OutputFilename != "") { // Specified an output filename? - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists! Sending to standard output.\n"; @@ -79,7 +79,7 @@ int main(int argc, char **argv) { } OutputFilename += ".ll"; - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists! Sending to standard output.\n"; diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index 55e8d5d6690..11e67c4fe8b 100644 --- a/tools/llvm-dis/llvm-dis.cpp +++ b/tools/llvm-dis/llvm-dis.cpp @@ -58,7 +58,7 @@ int main(int argc, char **argv) { } if (OutputFilename != "") { // Specified an output filename? - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists! Sending to standard output.\n"; @@ -79,7 +79,7 @@ int main(int argc, char **argv) { } OutputFilename += ".ll"; - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists! Sending to standard output.\n"; diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index db21db06544..4f7530ced3e 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -111,7 +111,7 @@ int main(int argc, char **argv) { ostream *Out = &cout; // Default to printing to stdout... if (OutputFilename != "-") { - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 6cbf25111bf..f9f4ba08a1f 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -127,7 +127,7 @@ int main(int argc, char **argv) { std::ostream *Out = &std::cout; // Default to printing to stdout... if (OutputFilename != "") { - if (!Force && !std::ifstream(OutputFilename.c_str())) { + if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! cerr << "Error opening '" << OutputFilename << "': File exists!\n" << "Use -f command line argument to force output\n"; -- 2.34.1