summaryrefslogtreecommitdiff
path: root/src/iostream.cpp
AgeCommit message (Collapse)Author
2017-08-07[libc++] Don't hardcode namespace in manual manglingShoaib Meenai
libc++'s inline namespace can change depending on the ABI version. Instead of hardcoding __1 in the manual Microsoft ABI manglings for the iostream globals, stringify _LIBCPP_NAMESPACE and use that instead, to work across all ABI versions. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@310290 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19[libc++] Use _LIBCPP_ABI_MICROSOFT instead of _MSC_VERShoaib Meenai
_LIBCPP_ABI_MICROSOFT is more appropriate to use here, since the conditionals are controlling Microsoft mangling. It wasn't used originally since it didn't exist at the time. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300743 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07Explicitly specify MSVC mangling of iostream globals. Patch from Dave LeeEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291337 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-26Make the presence of stdin and stdout optional.Ed Schouten
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-26Remove the state_types array.Ed Schouten
If we want to add support for making std::cin and std::cout optional, it is impractical to have all of the mbstate_t objects in one array. This would mean that if std::cin and std::cout are omitted, the state_types array is only used partially. Solve this by using separate global variables. These are placed right next to the iostream object and the buffer, meaning we can easily #ifdef them away. Differential Revision: http://reviews.llvm.org/D8359 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17Clean up iostream creation in preparation for conditionalizing streams.Ed Schouten
Interleave the code for narrow and wide character streams. This makes it more obvious that the two pieces of code are identical. Furthermore, it makes it easier to conditionally compile support for certain streams, as less #ifdef blocks are needed. Differential Revision: http://reviews.llvm.org/D8342 Reviewed by: marshall git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232516 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12Nico Rieck: this patch series fixes visibility issues on Windows as ↵Howard Hinnant
explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188192 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27Use reinterpret_casts directly in place of C-style casts.Joerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180679 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19This is an optimization which produces improved launching time. There ↵Howard Hinnant
should be no functionality change. Clients should see no ABI differences. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177443 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-31Protect use of alignas against older versions of clangHoward Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157764 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-16Alter the terminal streams such that they do not get added to the atexit ↵Howard Hinnant
chain, and thus never get destructed. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152926 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-30_STD -> _VSTD to avoid macro clash on windowsHoward Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134190 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16license changeHoward Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11libcxx initial importHoward Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103490 91177308-0d34-0410-b5e6-96231b3b80d8