aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Lamb <christopher.lamb@gmail.com>2007-12-24 23:49:33 +0000
committerChristopher Lamb <christopher.lamb@gmail.com>2007-12-24 23:49:33 +0000
commit4c92b433836fbcf65e33cca28866909e8fa472a9 (patch)
tree86dfed1651d450bd6c34c63755d6303f2a9183c4
parent396f9fee46bdb0230384ec3eced10875227919c6 (diff)
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
-rw-r--r--Driver/ASTConsumers.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index f3b595ffb1..9a773b32d9 100644
--- a/Driver/ASTConsumers.cpp
+++ b/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);