Commit Graph

1243 Commits

Author SHA1 Message Date
Richard Smith
aa87532fee Avoid using the name 'bzero' for an enumerator in global scope. <strings.h> might declare this as a function.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@193066 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-21 04:59:37 +00:00
Howard Hinnant
71b52152a9 r192075 broke the buildbot at
http://lab.llvm.org:8013/builders/libcxx_clang-x86_64-darwin11-RA

lit.py: <string>:230: note: inferred use_system_lib as: False
lit.py: <string>:247: fatal: C++ ABI setting None unsupported for tests

cxx_abi is geting set to None, and the lit script errors out shortly after
that.  This patch changes the default of cxx_abi from None to 'libcxxabi'.
This is likely not the right way to fix this problem.  However it gets the
buildbot running again.  Improvements to this fix are welcome.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192609 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 18:02:02 +00:00
Marshall Clow
9de3d4cab3 Patch from GM to make more implicit bools explicit since we can't stop MSVC warning about this in headers and to warn is the MSVC default. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192548 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-13 01:02:45 +00:00
Marshall Clow
0f91166ef8 Updated status of issues and features
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192546 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 22:57:58 +00:00
Marshall Clow
61a8422ffa LWG Issue 2087: iostream_category() and noexcept
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192545 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 22:49:56 +00:00
Marshall Clow
5f2d5b95e6 LWG Issue 2097: packaged_task constructors should be constrained
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192544 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 22:49:17 +00:00
Marshall Clow
206ce1faaf LWG issue 2143: ios_base::xalloc should be thread-safe
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192539 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 19:13:52 +00:00
Marshall Clow
1206720869 Implement national body comment GB9: remove std::gets
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192538 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 19:09:47 +00:00
Marshall Clow
b8dd5caf5a patch by Yaron: Uses rand_s() from stdlib.h (when building for Windows)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192325 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-09 21:49:03 +00:00
Marshall Clow
dab89a1412 Fix LWG Issue 2141: common_type trait produces reference types
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192142 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07 23:43:33 +00:00
Marshall Clow
16f13a0b84 Marked issue 2284 as complete
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192085 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07 03:26:42 +00:00
Marshall Clow
3f433cdb8e Apparently, I don't know the difference between 'left' and 'right'. Swap parameters named 'lhs' and 'rhs' so that they correctly refer to the 'left hand side' and 'right hand side' of comparisons. No functionality change. Thanks to Arthur O'Dwyer for pointing this out to me.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192080 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07 02:37:18 +00:00
Peter Collingbourne
4a0555a9d4 Silence the unused function warning in exception.cpp.
Rather than try to protect the function behind a precise,
ever-changing #if expression, just inline it into every caller.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192077 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 22:13:24 +00:00
Peter Collingbourne
ece95914ac Implement std::exception_ptr under libsupc++.
libsupc++ does not implement the dependent EH ABI and the
functionality it uses to implement std::exception_ptr (which it
declares as an alias of std::__exception_ptr::exception_ptr) is not
directly exported to clients. So we have little choice but to hijack
std::__exception_ptr::exception_ptr's (which fortunately has the
same layout as our std::exception_ptr) copy constructor, assignment
operator and destructor (which are part of its stable ABI), and its
rethrow_exception(std::__exception_ptr::exception_ptr) function.

Also, remove some out of date comments.

Differential Revision: http://llvm-reviews.chandlerc.com/D1826

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192076 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 22:13:21 +00:00
Peter Collingbourne
d0d308f54b Make it possible to link against libstdc++ as well as libsupc++ with CMake.
Linking against libstdc++, rather than libsupc++, is probably better
for people who need to link against clients of libstdc++.  Because
libsupc++ is provided only as a static library, its globals are not
shared between the static library and the copy linked into libstdc++.
This has been found to cause at least one test failure.

This also removes a number of symbols which were multiply defined
between libstdc++ and libc++, only when linking with libstdc++.

Differential Revision: http://llvm-reviews.chandlerc.com/D1825

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192075 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 22:13:19 +00:00
Peter Collingbourne
40455c65da Eliminate more symbols multiply defined between libsupc++ and libc++.
The remaining multiple definitions were flushed out by attempting to
link libsupc++ and libc++ into the same executable with --whole-archive,
e.g.

clang++ -I../llvm/projects/libcxx/include -nodefaultlibs -Wl,--whole-archive lib/libc++.a /usr/lib/gcc/x86_64-linux-gnu/4.6/libsupc++.a -Wl,--no-whole-archive -lgcc -lgcc_s -lc -lpthread -lrt

(The same technique was used to flush out multiple definitions in
libstdc++.)

Differential Revision: http://llvm-reviews.chandlerc.com/D1824

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192074 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 22:13:16 +00:00
Howard Hinnant
ae2b90b86d G M: 1. It changes the temp file handling to use the template and the current directory for windows, matching how it works on other platforms.
2. It re-enables the temp file handling for mingw that regressed.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192073 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 21:14:05 +00:00
Howard Hinnant
e064055942 G M: Rename local variable from __except to avoid MSVC keyword clash.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192072 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 21:00:29 +00:00
Howard Hinnant
35a98a00b3 Use _LIBCPP_NEW_DELETE_VIS instead of LIBCPP_FUNC_VIS in src/new.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192071 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 20:53:24 +00:00
Howard Hinnant
2bcdf5e9a0 Yaron Keren: Add missing comment.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192068 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 19:48:40 +00:00
Marshall Clow
de3cac777d LWG Issue 2247
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192058 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 07:19:23 +00:00
Marshall Clow
69bf761909 Updated status post-Chicago
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192057 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 07:10:55 +00:00
Marshall Clow
2faa02fc3d Add tests making sure that optional<T>s can be compared at compile time; this functionality was enabled by N3789
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192051 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 23:29:16 +00:00
Marshall Clow
79d8c99a62 LWG Issue 2247: Implement type trait 'is_null_pointer'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192049 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 21:21:17 +00:00
Marshall Clow
320c80fecf Implement literal suffixes for compled
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192048 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 21:19:49 +00:00
Marshall Clow
8d9dd7a968 Mark namespaces for user defined literals as 'inline'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192047 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 21:18:32 +00:00
Marshall Clow
1d927e38d1 Implement LWG issue 2275 'forward_as_tuple should be constexpr'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192038 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 18:46:37 +00:00
Howard Hinnant
520dc52b4a G M: Remove unneeded warnings in buildit that are hindering porting.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192012 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 00:13:31 +00:00
Howard Hinnant
adb73b1701 G M: Attached is a patch for libcxx's cmake file.
I've changed it so we don't set highest level warnings (all) for MSVC when building projects using cmake and instead leave the default. That's /W4 on my machine and seems to be ok.
 
With all warnings on for msvc, we see literally thousands of warnings. 99.99% aren't relevant and just obscure the ones that are.
I think the user can still override things if they want something different from the command line when using cmake.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192010 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 00:07:35 +00:00
Howard Hinnant
5a8b5783f8 G M: The attached patch is for libcxx's new.cpp and __config files. The patch's intent is to make new.cpp compile using MS's cl.exe compiler without changing the meaning of anything for any other compiler.
The issue this patch seeks to address is that MS's compiler (cl.exe) doesn't support the __attribute__((__weak__)) or __atribute__((__visibility__("default")) syntax; so a solution must be found where cl.exe doesn't see this syntax.

This patch seeks to solve this problem by changing code patterned like this:
__attribute__((__weak__, __visibility__("default")))
void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { /*snip*/; return p; }

to code like this:
_LIBCPP_WEAK
void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { return p; }

Howard:  Thanks for all the comments regarding the default visibility
tag on the definition.  I agree it isn't needed, and that there are lots
of other places where it is missing.  That being said, I'm not wanting
to rock the boat on that issue right now.  So I've added it back to the
definition via _LIBCPP_FUNC_VIS.  A later pass dedicated just to this
issue can bring things in to a consistent state one way or the other. 
Note that we do not want to have the exact same attributes on the
declaration and defintion in this case.  The declaration should not be
marked weak, whereas the definition should (which is what G M's patch
did). I've fully tested on OS X to ensure that the resultant attribute
syntax actually works.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192007 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 23:56:37 +00:00
Howard Hinnant
9844b6796b G M: A small patch to fix a couple of warnings in stdexcept.cpp for cl.exe which does not support #pragma visibility.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191988 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 22:12:59 +00:00
Howard Hinnant
1e564246ec G M: Changes all references to "x inline" to "inline x" where x = _libcpp_always_inline or _libcpp_inline_visibility macros.
The patch touches these files:

locale
array
deque
new
string
utility
vector
__bit_reference
__split_buffer
locale_win32.h
 
There is no intended functionality change and it is expected that reversing the position of the inline keyword with regard to the other keywords does not change the meaning of anything, least not for apple/Linux etc.
 
It is intended to make libcxx more consistent with itself and to prevent the 1000 or so
"inline.cpp(3) : warning C4141: 'inline' : used more than once" warnings that MS's cl.exe compiler emits without this patch, i.e. if inline is not the first keyword before a function name etc.
 
Prefer "inline [other inline related keyword]" over "[other related keyword] inline".
After this patch, libcxx should be consistent to this pattern.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191987 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 22:09:00 +00:00
Howard Hinnant
f677bc4165 G M: Fix libcxx's detection of rtti disablement for g++.exe and cl.exe. When RTTI is NOT enabled, _LIBCPP_NO_RTTI is defined.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191981 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 21:24:21 +00:00
Howard Hinnant
f7555069ab G M: Provides the _LIBCPP_WARNING macro, to be used for MSVC only, since that compiler doesn't support #warning.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191980 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 21:14:44 +00:00
Peter Collingbourne
66a8fcecd9 libc++abi no longer has a cxa_demangle.h header.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191935 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 22:58:36 +00:00
Peter Collingbourne
8df0320334 Re-add bad_cast and bad_typeid default ctor definitions under libsupc++.
libsupc++ declares these constructors inline, so we won't necessarily
get a definition for them in the library.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191931 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 22:04:10 +00:00
Peter Collingbourne
4c81b00f75 Make it possible to run the test suite when built as part of LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191930 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 21:58:25 +00:00
Alexey Samsonov
f7eb5738f6 Explicitly specify -Wno-error if LIBCXX_ENABLE_WERROR is false.
libcxx doesn't build with -Werror because of #warnings in its source
code. But when libcxx is built as an external LLVM project, it inherits
LLVM build flags, breaking the build if LLVM_ENABLE_WERROR is enabled.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191814 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 07:44:19 +00:00
Marshall Clow
19e7862eb8 Remove non-printable chars that snuck in back in July; thanks to Yaron Keren for the catch
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191756 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-01 13:28:20 +00:00
Marshall Clow
bd444af850 Part 8 of LWG Issue 2210' unordered_set and unordered multiset; this got missed when I went on vacation
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191705 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 21:33:51 +00:00
Howard Hinnant
ff7546e974 SCARY/N2913 iterator support between the multi and non-multi versions of the associative and unordered containers. I beleive lack of support for this was accidentally recently introduced (by me) and this is fixing a regression. This time tests are put in to prevent such a regression in the future.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191692 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 19:08:22 +00:00
Alexey Samsonov
179fa78da3 [CMake] Put libcxx-specific module directories to the front of CMAKE_MODULE_PATH.
Otherwise if libcxx is built as an LLVM external project (after r191624),
"include(config-ix)" will include config-ix.cmake from LLVM, not from libcxx,
which will result in misconfigured build tree.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191657 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 09:10:01 +00:00
Marshall Clow
9738cafa4f Implement n3789; constexpr support in named function objects
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191626 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-28 19:06:12 +00:00
Marshall Clow
6db12cb037 Add a set of macros for using the new '[[[deprecated]]' attribute. No code changes (yet)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191625 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-28 18:35:31 +00:00
Marshall Clow
4af78bb10b Fixed bad link for n3789; thanks to Chip Davis for the catch
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191598 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-28 01:52:18 +00:00
Marshall Clow
42389d214f Updated my role
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191596 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-28 01:25:55 +00:00
Marshall Clow
cb55b18fa9 Missed a change that didn't have an issue number 'GB 9'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191575 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 22:21:17 +00:00
Marshall Clow
91008752ed Updated table with results from Chicago
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191573 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 22:16:32 +00:00
Chandler Carruth
d1754fb3e9 Make the guard for external ABI libraries include the guard for
libsupc++ in typeinfo.cpp, bringing it into agreement with
exception.cpp. This fixes link errors due to duplicate symbols from
this translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191397 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-25 20:01:44 +00:00
Howard Hinnant
fc910cb9a0 Peter Collingbourne: Fix warnings when compiling with -DNDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191148 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21 21:26:37 +00:00