summaryrefslogtreecommitdiffstats
path: root/libcxx/src/new.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove a long-standing __has_include hack.Benjamin Kramer2015-10-161-6/+2
| | | | | | | | | This was put in to get libc++ building without libcxxabi. We now have macros that show that we are building against libcxxabi so use that instead. This guards against existing but broken cxxabi.h headers on the system. llvm-svn: 250507
* Fix a typo: overidden -> overridden - Patch from Kai ZhaoEric Fiselier2015-08-201-1/+1
| | | | llvm-svn: 245539
* Fix for LWG Issue 2458: N3778 and new library deallocation signatures.Marshall Clow2015-05-181-14/+0
| | | | llvm-svn: 237592
* More on adding sized deallocation functions in libc++: Continuing from ↵Larisse Voufo2015-02-201-8/+8
| | | | | | r229281, this adds version guards and test cases. llvm-svn: 229968
* Implement C++14's sized deallocation functions, since there are no longer ↵Larisse Voufo2015-02-151-1/+29
| | | | | | implicitly defined by clang, as of r229241. llvm-svn: 229281
* Partial fix for building w/ libcxxrt on OSX. Patch from C Bergstrom.Eric Fiselier2014-11-011-1/+1
| | | | llvm-svn: 221029
* libcxxrt defines bad_array_new_length::what() so move that into a ↵Eric Fiselier2014-11-011-6/+6
| | | | | | conditional compilation block llvm-svn: 221025
* libcxxrt now implements bad_array_new_length and need to gaurd against ↵Eric Fiselier2014-10-291-2/+2
| | | | | | multiple defines. Patch from Baptiste Daroussin. llvm-svn: 220882
* Switch to using C++ style casts.Joerg Sonnenberger2014-01-041-1/+1
| | | | llvm-svn: 198505
* Patch from Bruce Mitchener; fixes two typos in comments. No functionality ↵Marshall Clow2013-11-111-1/+1
| | | | | | change. PR17843 llvm-svn: 194432
* Make it possible to link against libstdc++ as well as libsupc++ with CMake.Peter Collingbourne2013-10-061-0/+4
| | | | | | | | | | | | | | | 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
* Eliminate more symbols multiply defined between libsupc++ and libc++.Peter Collingbourne2013-10-061-1/+15
| | | | | | | | | | | | | | | 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
* Use _LIBCPP_NEW_DELETE_VIS instead of LIBCPP_FUNC_VIS in src/new.cpp.Howard Hinnant2013-10-061-8/+8
| | | | llvm-svn: 192071
* G M: The attached patch is for libcxx's new.cpp and __config files. The ↵Howard Hinnant2013-10-041-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Adding bad_array_length to libc++Marshall Clow2013-09-111-1/+17
| | | | llvm-svn: 190478
* Removed raw references to __APPLE__; now just check to see if it is defined.Marshall Clow2013-03-181-1/+1
| | | | llvm-svn: 177297
* Patch by Andrew C. Morrow: Conditionally include cxxabi.h in new.cpp and ↵Howard Hinnant2012-07-261-1/+10
| | | | | | | | | | | | typeinfo.cpp. Both new.cpp and typeinfo.cpp have code that is conditionally compiled based on the LIBCXXRT and _LIBCPPABI_VERSION defines, but those files do not currently include <cxxabi.h> in the non __APPLE__ case. The attached patch updates those files so that for non __APPLE__ builds <cxxabi.h> is included if available or if LIBCXXRT is set. I'm modeling this on the recent updates to exception.cpp. llvm-svn: 160790
* Undo some overzealous #ifdefs for LIBCXXRT.David Chisnall2012-03-141-5/+2
| | | | llvm-svn: 152718
* Some libcxxrt-compatibility cleanups (avoid defining things twice).David Chisnall2012-02-291-2/+5
| | | | llvm-svn: 151717
* At least temporarily move operator new/delete from the abi back to here. ↵Howard Hinnant2012-02-251-2/+2
| | | | | | I'm having trouble reexporting it as a weak symbol. llvm-svn: 151459
* Prepare for running on top of new libc++abi.Howard Hinnant2012-02-021-4/+15
| | | | llvm-svn: 149634
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-1/+1
| | | | llvm-svn: 145624
* http://llvm.org/bugs/show_bug.cgi?id=10353Howard Hinnant2011-07-141-0/+6
| | | | llvm-svn: 135125
* Applied noexcept to everything in [language.support] (Chapter 18)Howard Hinnant2011-05-261-16/+16
| | | | llvm-svn: 132129
* oops, forgot std::Howard Hinnant2010-12-041-1/+1
| | | | llvm-svn: 120915
* Fix up uses of new/terminate/unexpected handlers to use the new getters.Howard Hinnant2010-12-041-2/+3
| | | | llvm-svn: 120914
* N3189 Observers for the three handler functionsHoward Hinnant2010-12-021-3/+7
| | | | llvm-svn: 120712
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* Remove tabsHoward Hinnant2010-08-221-4/+4
| | | | llvm-svn: 111778
* Fixing whitespace problemsHoward Hinnant2010-08-221-20/+12
| | | | llvm-svn: 111751
* now works with -fno-exceptions and -fno-rttiHoward Hinnant2010-08-111-0/+14
| | | | llvm-svn: 110828
* patch by Jeffrey Yasskin for porting to Ubuntu Hardy. Everything was ↵Howard Hinnant2010-05-241-2/+2
| | | | | | accepted except there were some bug fixes needed in <locale> for the __nolocale_* series. For the apple branch I ended up using templates instead of the var_args solution because it seemed both safer and more efficient. llvm-svn: 104516
* Add set_new_handler and nothrow implementationsNick Kledzik2010-05-181-0/+10
| | | | llvm-svn: 104073
* add headers and implementation for <new>, <exception>, and <typeinfo>Nick Kledzik2010-05-141-0/+127
| | | | llvm-svn: 103795
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-111-1/+1
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-111-0/+31
llvm-svn: 103490
OpenPOWER on IntegriCloud