Commit Graph

1235 Commits

Author SHA1 Message Date
Howard Hinnant 58af7e177c 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.

llvm-svn: 192609
2013-10-14 18:02:02 +00:00
Marshall Clow 9f21325ac7 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.
llvm-svn: 192548
2013-10-13 01:02:45 +00:00
Marshall Clow 96bb15f464 Updated status of issues and features
llvm-svn: 192546
2013-10-12 22:57:58 +00:00
Marshall Clow c3776b1ce0 LWG Issue 2087: iostream_category() and noexcept
llvm-svn: 192545
2013-10-12 22:49:56 +00:00
Marshall Clow d58daf9433 LWG Issue 2097: packaged_task constructors should be constrained
llvm-svn: 192544
2013-10-12 22:49:17 +00:00
Marshall Clow f28fd284f8 LWG issue 2143: ios_base::xalloc should be thread-safe
llvm-svn: 192539
2013-10-12 19:13:52 +00:00
Marshall Clow 8de32cb3dc Implement national body comment GB9: remove std::gets
llvm-svn: 192538
2013-10-12 19:09:47 +00:00
Marshall Clow 0354b92992 patch by Yaron: Uses rand_s() from stdlib.h (when building for Windows)
llvm-svn: 192325
2013-10-09 21:49:03 +00:00
Marshall Clow db78c7049e Fix LWG Issue 2141: common_type trait produces reference types
llvm-svn: 192142
2013-10-07 23:43:33 +00:00
Marshall Clow 5d5e7dbe94 Marked issue 2284 as complete
llvm-svn: 192085
2013-10-07 03:26:42 +00:00
Marshall Clow 4f44079a2c 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.
llvm-svn: 192080
2013-10-07 02:37:18 +00:00
Peter Collingbourne 8b9c5d1ac7 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.

llvm-svn: 192077
2013-10-06 22:13:24 +00:00
Peter Collingbourne 3b5d969293 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

llvm-svn: 192076
2013-10-06 22:13:21 +00:00
Peter Collingbourne 26dd09e57f 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

llvm-svn: 192075
2013-10-06 22:13:19 +00:00
Peter Collingbourne 926aa5f4f2 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

llvm-svn: 192074
2013-10-06 22:13:16 +00:00
Howard Hinnant 6d48bdd2a8 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.

llvm-svn: 192073
2013-10-06 21:14:05 +00:00
Howard Hinnant 04c63bdb36 G M: Rename local variable from __except to avoid MSVC keyword clash.
llvm-svn: 192072
2013-10-06 21:00:29 +00:00
Howard Hinnant 32f9a776fb Use _LIBCPP_NEW_DELETE_VIS instead of LIBCPP_FUNC_VIS in src/new.cpp.
llvm-svn: 192071
2013-10-06 20:53:24 +00:00
Howard Hinnant f66a81ad56 Yaron Keren: Add missing comment.
llvm-svn: 192068
2013-10-06 19:48:40 +00:00
Marshall Clow 82f4901d5f LWG Issue 2247
llvm-svn: 192058
2013-10-06 07:19:23 +00:00
Marshall Clow 4fc5ae4c1c Updated status post-Chicago
llvm-svn: 192057
2013-10-06 07:10:55 +00:00
Marshall Clow d2f095e5ba Add tests making sure that optional<T>s can be compared at compile time; this functionality was enabled by N3789
llvm-svn: 192051
2013-10-05 23:29:16 +00:00
Marshall Clow dbd2ebb07e LWG Issue 2247: Implement type trait 'is_null_pointer'
llvm-svn: 192049
2013-10-05 21:21:17 +00:00
Marshall Clow ea7c7cc521 Implement literal suffixes for compled
llvm-svn: 192048
2013-10-05 21:19:49 +00:00
Marshall Clow 3ceafc7f01 Mark namespaces for user defined literals as 'inline'
llvm-svn: 192047
2013-10-05 21:18:32 +00:00
Marshall Clow de9320aa2b Implement LWG issue 2275 'forward_as_tuple should be constexpr'
llvm-svn: 192038
2013-10-05 18:46:37 +00:00
Howard Hinnant 68a2610520 G M: Remove unneeded warnings in buildit that are hindering porting.
llvm-svn: 192012
2013-10-05 00:13:31 +00:00
Howard Hinnant 4e07b5b955 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.

llvm-svn: 192010
2013-10-05 00:07:35 +00:00
Howard Hinnant a942f2ffd7 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.

llvm-svn: 192007
2013-10-04 23:56:37 +00:00
Howard Hinnant 79710108a4 G M: A small patch to fix a couple of warnings in stdexcept.cpp for cl.exe which does not support #pragma visibility.
llvm-svn: 191988
2013-10-04 22:12:59 +00:00
Howard Hinnant 3af48ef76e 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.

llvm-svn: 191987
2013-10-04 22:09:00 +00:00
Howard Hinnant f7a8c4f347 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.
llvm-svn: 191981
2013-10-04 21:24:21 +00:00
Howard Hinnant 80b84d4c26 G M: Provides the _LIBCPP_WARNING macro, to be used for MSVC only, since that compiler doesn't support #warning.
llvm-svn: 191980
2013-10-04 21:14:44 +00:00
Peter Collingbourne db21c7bbb0 libc++abi no longer has a cxa_demangle.h header.
llvm-svn: 191935
2013-10-03 22:58:36 +00:00
Peter Collingbourne 3a572699e4 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.

llvm-svn: 191931
2013-10-03 22:04:10 +00:00
Peter Collingbourne 4806fcd697 Make it possible to run the test suite when built as part of LLVM.
llvm-svn: 191930
2013-10-03 21:58:25 +00:00
Alexey Samsonov eb38496950 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.

llvm-svn: 191814
2013-10-02 07:44:19 +00:00
Marshall Clow ad864049d6 Remove non-printable chars that snuck in back in July; thanks to Yaron Keren for the catch
llvm-svn: 191756
2013-10-01 13:28:20 +00:00
Marshall Clow 45b983c4d0 Part 8 of LWG Issue 2210' unordered_set and unordered multiset; this got missed when I went on vacation
llvm-svn: 191705
2013-09-30 21:33:51 +00:00
Howard Hinnant 9fd9f84f48 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.
llvm-svn: 191692
2013-09-30 19:08:22 +00:00
Alexey Samsonov 1859544071 [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.

llvm-svn: 191657
2013-09-30 09:10:01 +00:00
Marshall Clow 3d5134dd52 Implement n3789; constexpr support in named function objects
llvm-svn: 191626
2013-09-28 19:06:12 +00:00
Marshall Clow 8392ab209e Add a set of macros for using the new '[[[deprecated]]' attribute. No code changes (yet)
llvm-svn: 191625
2013-09-28 18:35:31 +00:00
Marshall Clow ba132bb198 Fixed bad link for n3789; thanks to Chip Davis for the catch
llvm-svn: 191598
2013-09-28 01:52:18 +00:00
Marshall Clow 66a49bd240 Updated my role
llvm-svn: 191596
2013-09-28 01:25:55 +00:00
Marshall Clow 2cf77525be Missed a change that didn't have an issue number 'GB 9'
llvm-svn: 191575
2013-09-27 22:21:17 +00:00
Marshall Clow ff1b7ef31b Updated table with results from Chicago
llvm-svn: 191573
2013-09-27 22:16:32 +00:00
Chandler Carruth 0e99d99f77 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.

llvm-svn: 191397
2013-09-25 20:01:44 +00:00
Howard Hinnant 12bfc4fef1 Peter Collingbourne: Fix warnings when compiling with -DNDEBUG.
llvm-svn: 191148
2013-09-21 21:26:37 +00:00
Howard Hinnant 7a828034c6 Peter Collingbourne: If a pointer is passed as the third argument of the (iterator,
iterator, allocator) constructor with the intention of it being
implicitly converted to the allocator type, it is possible for overload
resolution to favour the (iterator, iterator, enable_if) constructor.
Eliminate this possibility by moving the enable_if to one of the
existing arguments and removing the third argument.

llvm-svn: 191145
2013-09-21 21:13:54 +00:00