Fix major bug in my last checkin. :(
authorChris Lattner <sabre@nondot.org>
Fri, 13 Jun 2003 16:10:26 +0000 (16:10 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 13 Jun 2003 16:10:26 +0000 (16:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6688 91177308-0d34-0410-b5e6-96231b3b80d8

tools/link/link.cpp
tools/llvm-link/llvm-link.cpp

index 99181f3344a5daa52366def4f520447f7d5f899b..58959cfa41629b20bae0ff60c0882f99a7513df5 100644 (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
index 99181f3344a5daa52366def4f520447f7d5f899b..58959cfa41629b20bae0ff60c0882f99a7513df5 100644 (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