summaryrefslogtreecommitdiffstats
path: root/libcxx/src/string.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert r284193 - it is not correct on OS XEric Fiselier2016-10-141-3/+0
| | | | llvm-svn: 284194
* Re-export two previously exported std::string functions.Eric Fiselier2016-10-141-0/+3
| | | | | | | These functions were removed from the dylib sometime between the 3.9 release and now. This patch manually exports them to re-gain ABI compatibility. llvm-svn: 284193
* Revert r282345 - Use __attribute__((internal_linkage)) when available.Eric Fiselier2016-10-131-23/+0
| | | | llvm-svn: 284101
* Use __attribute__((internal_linkage)) when available.Eric Fiselier2016-09-251-0/+23
| | | | | | | | | | | | | | | | | | | | | Summary: This patch has been a long time coming (Thanks @eugenis). It changes `_LIBCPP_INLINE_VISIBILITY` to use `__attribute__((internal_linkage))` instead of `__attribute__((visibility("hidden"), always_inline))`. The point of `_LIBCPP_INLINE_VISIBILITY` is to prevent inline functions from being exported from both the libc++ library and from user libraries. This helps libc++ better manage it's ABI. Previously this was done by forcing inlining and modifying the symbols visibility. However inlining isn't guaranteed and symbol visibility only affects shared libraries making this an imperfect solution. `internal_linkage` improves this situation by making all symbols local to the TU they are emitted in, regardless of inlining or visibility. IIRC the effect of applying `__attribute__((internal_linkage))` to an inline function is the same as applying `static`. For more information about the attribute see: http://lists.llvm.org/pipermail/cfe-dev/2015-October/045580.html Most of the work for this patch was done by @eugenis. Reviewers: mclow.lists, eugenis Subscribers: eugenis, cfe-commits Differential Revision: https://reviews.llvm.org/D24642 llvm-svn: 282345
* [libc++] Fix extern template visibility for WindowsShoaib Meenai2016-09-191-3/+3
| | | | | | | | | | On Windows, marking an `extern template class` declaration as exported actually forces an instantiation, which is not the desired behavior. Instead, the actual explicit instantiations need to be exported. Differential Revision: https://reviews.llvm.org/D24679 llvm-svn: 281925
* Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception ↵Marshall Clow2016-08-251-1/+1
| | | | | | type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. llvm-svn: 279744
* Print log/error messages on stderr, not stdoutEd Schouten2015-03-101-1/+1
| | | | | | | | | | | | There are a couple of places where libc++ prints log/error messages to stdout on its own. This may of course interfere with the output generated with applications. Log/error messages should be directed to stderr instead. Differential Revision: http://reviews.llvm.org/D8135 Reviewed by: marshall llvm-svn: 231767
* Initialize pointer in string conversion helpers to prevent MSAN diagnostic.Eric Fiselier2014-11-141-2/+2
| | | | | | | | Since the initialization of the pointer happens across the libc library boundry MSAN will not know the pointer was initialized. This fixes MSAN failures in test/strings/string.conversions. llvm-svn: 222052
* Revert "Turn off extern templates for most uses."Justin Bogner2014-08-151-2/+0
| | | | | | | | | | | Turning off explicit template instantiation leads to a pretty significant build time and code size cost. We're better off dealing with ABI incompatibility issues that come up in a less heavy handed way. This reverts commit r189610. llvm-svn: 215740
* Fix typo.Joerg Sonnenberger2013-09-171-1/+1
| | | | llvm-svn: 190857
* Turn off extern templates for most uses. It is causing more problems than ↵Howard Hinnant2013-08-291-0/+2
| | | | | | it is worth. The extern templates will still be built into the dylib, mainly for ABI stability purposes. And the client can still turn these back on with a #define if desire. This fixes http://llvm.org/bugs/show_bug.cgi?id=17027. However there's no associated test for the test suite because http://llvm.org/bugs/show_bug.cgi?id=17027 needs mismatched dylib and headers to fire. llvm-svn: 189610
* Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which isHoward Hinnant2013-08-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can also define _MSC_VER, and MSVCRT is not necessarily the only C runtime, these macros should not be used interchangeably. This patch divides all Windows-related bits into the aforementioned categories. Two new macros are introduced: - _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using _MSC_VER, excluding Clang. - _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default when _WIN32 is defined. This leaves _WIN32 for code using the Windows API. This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF. Nico, please prepare a patch for CREDITS.TXT, thanks. llvm-svn: 187593
* Add some friendly messages to libcxx calls to abort().Howard Hinnant2013-07-231-0/+2
| | | | llvm-svn: 186951
* Glen: This patch gets the string conversion functions working on Windows. ↵Howard Hinnant2013-05-161-489/+328
| | | | | | It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability. llvm-svn: 182026
* Removed raw references to _WIN32; now just check to see if it is defined.Marshall Clow2013-03-181-1/+1
| | | | llvm-svn: 177291
* Saleem Abdulrasool: If errno is defined as volatile int, the qualifier ↵Howard Hinnant2013-01-221-16/+16
| | | | | | | | | | | differences can cause template typename deductions on swap<> (used in string.cpp). Use decltype(errno) to replicate the type and qualifier information for holding the errno value. Because errno is expected to be assignable, there is no need to use typename std::remove_const<decltype(errno)>::type to hold the value. llvm-svn: 173172
* Fix string conversions functions to throw out_of_range properly. Fixes ↵Howard Hinnant2013-01-141-58/+66
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14919. llvm-svn: 172447
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-18/+18
| | | | llvm-svn: 145624
* Work on Windows port by Ruben Van BoxemHoward Hinnant2011-09-231-0/+3
| | | | llvm-svn: 140384
* Fixing up some ABI issuesHoward Hinnant2011-07-071-46/+0
| | | | llvm-svn: 134639
* LWG 1323Howard Hinnant2010-11-171-2/+2
| | | | llvm-svn: 119560
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* Fixing whitespace problemsHoward Hinnant2010-08-221-16/+16
| | | | llvm-svn: 111751
* now works with -fno-exceptions and -fno-rttiHoward Hinnant2010-08-111-0/+32
| | | | llvm-svn: 110828
* [string.conversions]Howard Hinnant2010-06-021-0/+690
llvm-svn: 105336
OpenPOWER on IntegriCloud