forked from OSchip/llvm-project
Make output files binary mode for -emit-llvm-bc
llvm-svn: 45348
This commit is contained in:
parent
bccb8c432d
commit
2b84813441
|
@ -654,10 +654,12 @@ ASTConsumer *clang::CreateBCWriter(const std::string& InFile,
|
||||||
Path.eraseSuffix();
|
Path.eraseSuffix();
|
||||||
Path.appendSuffix("bc");
|
Path.appendSuffix("bc");
|
||||||
FileName = Path.toString();
|
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 {
|
} 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);
|
return new BCWriter(Out, Diags, Features);
|
||||||
|
|
Loading…
Reference in New Issue