Go to file
Ed Schouten f4ac884f2b Make the presence of stdin and stdout optional.
The idea behind Nuxi CloudABI is that it is targeted at (but not limited to)
running networked services in a sandboxed environment. The model behind stdin,
stdout and stderr is strongly focused on interactive tools in a command shell.
CloudABI does not support the notion of stdin and stdout, as 'standard
input/output' does not apply to services. The concept of stderr does makes
sense though, as services do need some mechanism to log error messages in a
uniform way.

This patch extends libc++ in such a way that std::cin and std::cout and the
associated <cstdio>/<cwchar> functions can be disabled through the flags
_LIBCPP_HAS_NO_STDIN and _LIBCPP_HAS_NO_STDOUT, respectively. At the same time
it attempts to clean up src/iostream.cpp a bit. Instead of using a single array
of mbstate_t objects and hardcoding the array indices, it creates separate
objects that declared next to the iostream objects and their buffers. The code
is also restructured by interleaving the construction and setup of c* and wc*
objects. That way it is more obvious that this is done identically.

The c* and wc* objects already have separate unit tests. Make use of this fact
by adding XFAILs in case libcpp-has-no-std* is set. That way the tests work in
both directions. If stdin or stdout is disabled, these tests will therefore
test for the absence of c* and wc*.

Differential Revision:	http://reviews.llvm.org/D8340

llvm-svn: 233275
2015-03-26 14:35:46 +00:00
clang Let Clang invoke CloudABI's linker. 2015-03-26 11:13:44 +00:00
clang-tools-extra Fix false positive on anonymous namespaces in headers. 2015-03-24 15:21:45 +00:00
compiler-rt [Sanitizer] Plug a leak in POSIXSymbolizer::FindModuleForAddress 2015-03-26 07:14:29 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Implement fast_distance builtin 2015-03-23 18:10:04 +00:00
libcxx Make the presence of stdin and stdout optional. 2015-03-26 14:35:46 +00:00
libcxxabi Don't print debugging messages to stdout. 2015-03-19 09:17:21 +00:00
lld Revert blank line after test commit 2015-03-26 10:44:14 +00:00
lldb Handle FreeBSD/arm64 core files 2015-03-26 14:20:00 +00:00
llgo llgoi: Fix type identity for imported binary packages. 2015-03-18 08:34:40 +00:00
llvm [mips] Move the setATReg definition inside the MipsAssemblerOptions class. NFC. 2015-03-26 13:08:55 +00:00
openmp fix for broken commit 231774 2015-03-10 10:14:57 +00:00
polly Drop -polly-vectorizer-unroll-only option 2015-03-23 07:00:36 +00:00