[cfe-commits] r111106 - /cfe/trunk/lib/Frontend/ASTUnit.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sun Aug 15 09:54:31 PDT 2010
Author: d0k
Date: Sun Aug 15 11:54:31 2010
New Revision: 111106
URL: http://llvm.org/viewvc/llvm-project?rev=111106&view=rev
Log:
Open AST/PCH files in binary mode.
Modified:
cfe/trunk/lib/Frontend/ASTUnit.cpp
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=111106&r1=111105&r2=111106&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Sun Aug 15 11:54:31 2010
@@ -1598,7 +1598,8 @@
// FIXME: Can we somehow regenerate the stat cache here, or do we need to
// unconditionally create a stat cache when we parse the file?
std::string ErrorInfo;
- llvm::raw_fd_ostream Out(File.str().c_str(), ErrorInfo);
+ llvm::raw_fd_ostream Out(File.str().c_str(), ErrorInfo,
+ llvm::raw_fd_ostream::F_Binary);
if (!ErrorInfo.empty() || Out.has_error())
return true;
@@ -1609,7 +1610,6 @@
// Write the generated bitstream to "Out".
Out.write((char *)&Buffer.front(), Buffer.size());
- Out.flush();
Out.close();
return Out.has_error();
}
More information about the cfe-commits
mailing list