[cfe-commits] r45348 - /cfe/trunk/Driver/ASTConsumers.cpp
Christopher Lamb
christopher.lamb at gmail.com
Mon Dec 24 15:49:35 PST 2007
Author: clamb
Date: Mon Dec 24 17:49:33 2007
New Revision: 45348
URL: http://llvm.org/viewvc/llvm-project?rev=45348&view=rev
Log:
Make output files binary mode for -emit-llvm-bc
Modified:
cfe/trunk/Driver/ASTConsumers.cpp
Modified: cfe/trunk/Driver/ASTConsumers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/ASTConsumers.cpp?rev=45348&r1=45347&r2=45348&view=diff
==============================================================================
--- cfe/trunk/Driver/ASTConsumers.cpp (original)
+++ cfe/trunk/Driver/ASTConsumers.cpp Mon Dec 24 17:49:33 2007
@@ -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);
More information about the cfe-commits
mailing list