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
diff --git a/tools/as/as.cpp b/tools/as/as.cpp
index 0fbd1e6..5904974 100644
--- a/tools/as/as.cpp
+++ b/tools/as/as.cpp
@@ -39,7 +39,7 @@
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 @@
}
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 55e8d5d..11e67c4 100644
--- a/tools/dis/dis.cpp
+++ b/tools/dis/dis.cpp
@@ -58,7 +58,7 @@
}
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 @@
}
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 db21db0..4f7530c 100644
--- a/tools/link/link.cpp
+++ b/tools/link/link.cpp
@@ -111,7 +111,7 @@
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 1d63b28..1e7defa 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -136,7 +136,7 @@
"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 @@
// 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 @@
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 0fbd1e6..5904974 100644
--- a/tools/llvm-as/as.cpp
+++ b/tools/llvm-as/as.cpp
@@ -39,7 +39,7 @@
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 @@
}
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 0fbd1e6..5904974 100644
--- a/tools/llvm-as/llvm-as.cpp
+++ b/tools/llvm-as/llvm-as.cpp
@@ -39,7 +39,7 @@
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 @@
}
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 55e8d5d..11e67c4 100644
--- a/tools/llvm-dis/dis.cpp
+++ b/tools/llvm-dis/dis.cpp
@@ -58,7 +58,7 @@
}
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 @@
}
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 55e8d5d..11e67c4 100644
--- a/tools/llvm-dis/llvm-dis.cpp
+++ b/tools/llvm-dis/llvm-dis.cpp
@@ -58,7 +58,7 @@
}
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 @@
}
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 db21db0..4f7530c 100644
--- a/tools/llvm-link/llvm-link.cpp
+++ b/tools/llvm-link/llvm-link.cpp
@@ -111,7 +111,7 @@
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 6cbf251..f9f4ba0 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -127,7 +127,7 @@
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";