aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/System/Program.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-06-07 23:18:34 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-06-07 23:18:34 +0000
commit32f5553c03dc97912b0aa77583a23972e1a882e1 (patch)
tree1e7c40368d2b3994ed0b9b4f297996a0eba21ac2 /include/llvm/System/Program.h
parent2991b01b183abb12ae7e29544e427f794d64b14c (diff)
For PR787:
Provide new llvm::sys::Program facilities for converting the stdout and stdin to binary mode. There is no standard way to do this and the available mechanisms are platform specific. Adjust the bytecode reader and writer to use these methods when their input is stdin or output is stdout. THis avoids the problem with \n writing CRLF to a bytecode file on windows. Patch Contributed by Michael Smith. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System/Program.h')
-rw-r--r--include/llvm/System/Program.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/System/Program.h b/include/llvm/System/Program.h
index 2f33ea5746..0a237bccbc 100644
--- a/include/llvm/System/Program.h
+++ b/include/llvm/System/Program.h
@@ -74,6 +74,10 @@ namespace sys {
///< this function will wait until the child finishes or forever if
///< it doesn't.
);
+ // These methods change the specified standard stream (stdin or stdout) to
+ // binary mode.
+ static void ChangeStdinToBinary();
+ static void ChangeStdoutToBinary();
};
}
}