Fix major bug in my last checkin. :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-06-13 16:10:26 +00:00
parent 85ed361198
commit 4a4dabaac0
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