mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Write .bc files to binary ostreams. This shouldn't change anything on unix,
but allows us to generate valid code on hosts (like windows) that do newline translation for text files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14418 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
036de03128
commit
a8e750f2b0
@ -73,7 +73,8 @@ int main(int argc, char **argv) {
|
||||
<< "Use -f command line argument to force output\n";
|
||||
return 1;
|
||||
}
|
||||
Out = new std::ofstream(OutputFilename.c_str());
|
||||
Out = new std::ofstream(OutputFilename.c_str(), std::ios_base::out |
|
||||
std::ios_base::trunc | std::ios_base::binary);
|
||||
} else { // Specified stdout
|
||||
Out = &std::cout;
|
||||
}
|
||||
@ -100,7 +101,8 @@ int main(int argc, char **argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Out = new std::ofstream(OutputFilename.c_str());
|
||||
Out = new std::ofstream(OutputFilename.c_str(), std::ios_base::out |
|
||||
std::ios_base::trunc | std::ios_base::binary);
|
||||
// Make sure that the Out file gets unlinked from the disk if we get a
|
||||
// SIGINT
|
||||
RemoveFileOnSignal(OutputFilename);
|
||||
|
Loading…
x
Reference in New Issue
Block a user