diff options
| author | Christopher Lamb <christopher.lamb@gmail.com> | 2007-12-24 23:49:33 +0000 |
|---|---|---|
| committer | Christopher Lamb <christopher.lamb@gmail.com> | 2007-12-24 23:49:33 +0000 |
| commit | 2b84813441cf612e69b0e5aabe80bca7c3bcfc5b (patch) | |
| tree | f03c7c870e4574bad478b863315b50357fcc414c | |
| parent | bccb8c432d0fea7a2cca51efd3a459170ef8fceb (diff) | |
| download | llvm-2b84813441cf612e69b0e5aabe80bca7c3bcfc5b.zip llvm-2b84813441cf612e69b0e5aabe80bca7c3bcfc5b.tar.gz llvm-2b84813441cf612e69b0e5aabe80bca7c3bcfc5b.tar.bz2 | |
Make output files binary mode for -emit-llvm-bc
llvm-svn: 45348
| -rw-r--r-- | clang/Driver/ASTConsumers.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/Driver/ASTConsumers.cpp b/clang/Driver/ASTConsumers.cpp index f3b595f..9a773b3 100644 --- a/clang/Driver/ASTConsumers.cpp +++ b/clang/Driver/ASTConsumers.cpp @@ -654,10 +654,12 @@ ASTConsumer *clang::CreateBCWriter(const std::string& InFile, 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); |
