Fix major bug in my last checkin. :(

llvm-svn: 6688
This commit is contained in:
Chris Lattner 2003-06-13 16:10:26 +00:00
parent 155ddfa098
commit 15bfe02e6f
2 changed files with 2 additions and 0 deletions

View File

@ -106,6 +106,7 @@ int main(int argc, char **argv) {
if (DumpAsm) std::cerr << "Here's the assembly:\n" << Composite.get();
std::ostream *Out = &std::cout; // Default to printing to stdout...
if (OutputFilename != "-") {
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
std::cerr << argv[0] << ": error opening '" << OutputFilename

View File

@ -106,6 +106,7 @@ int main(int argc, char **argv) {
if (DumpAsm) std::cerr << "Here's the assembly:\n" << Composite.get();
std::ostream *Out = &std::cout; // Default to printing to stdout...
if (OutputFilename != "-") {
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
std::cerr << argv[0] << ": error opening '" << OutputFilename