Make output files binary mode for -emit-llvm-bc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45348 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index f3b595f..9a773b3 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -654,10 +654,12 @@
       Path.eraseSuffix();
       Path.appendSuffix("bc");
       FileName = Path.toString();
-      Out = new std::ofstream(FileName.c_str());
+      Out = new std::ofstream(FileName.c_str(), 
+                              std::ios_base::binary|std::ios_base::out);
     }
   } else {
-    Out = new std::ofstream(FileName.c_str());
+    Out = new std::ofstream(FileName.c_str(), 
+                            std::ios_base::binary|std::ios_base::out);
   }
 
   return new BCWriter(Out, Diags, Features);