summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/value-init.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-10/+10
| | | | | | tests fail. llvm-svn: 188447
* Reinstate r170806, reverted in r170835, with a fix use i1 instead of i8 for ↵Richard Smith2012-12-211-0/+6
| | | | | | a value-initialized bool! llvm-svn: 170837
* Unrevert r147271, reverted in r147361.Richard Smith2011-12-301-2/+1
| | | | | | | | | | | | Also temporarily remove the assumption from IR gen that we can emit IR for every constant we can fold, since it isn't currently true in C++11, to fix PR11676. Original comment from r147271: constexpr: perform zero-initialization prior to / instead of performing a constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147384
* Revert r147271. This fixes PR11676.Rafael Espindola2011-12-301-1/+2
| | | | llvm-svn: 147362
* constexpr: perform zero-initialization prior to / instead of performing aRichard Smith2011-12-251-2/+1
| | | | | | constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147271
* PR11124: Don't overwrite memory outside of a base class when performing ↵Eli Friedman2011-10-141-0/+19
| | | | | | zero-initialization before running its constructor. llvm-svn: 141933
* Convert the standard default-construction loops to use phis andJohn McCall2011-07-131-16/+9
| | | | | | partial destruction. llvm-svn: 135033
* A number of array-related IR-gen cleanups.John McCall2011-07-091-17/+59
| | | | | | | | | | | | - Emit default-initialization of arrays that were partially initialized with initializer lists with a loop, rather than emitting the default initializer N times; - support destroying VLAs of non-trivial type, although this is not yet exposed to users; and - support the partial destruction of arrays initialized with initializer lists when an initializer throws an exception. llvm-svn: 134784
* Cut down unnecessary zero'ing when value-initializing arrays of C++ objects.Argyrios Kyrtzidis2011-04-281-0/+14
| | | | | | | -C++ objects with user-declared constructor don't need zero'ing. -We can zero-initialize arrays of C++ objects in "bulk" now, in which case don't zero-initialize each object again. llvm-svn: 130453
* When value-initializing the elements of an array not not included in the ↵Argyrios Kyrtzidis2011-04-281-0/+41
| | | | | | | | | | initializer make sure that a non-trivial C++ constructor gets called. Fixes rdar://9347552 & http://llvm.org/PR9801 llvm-svn: 130421
* Cleanup tests, no functionality change.Anders Carlsson2011-04-171-1/+2
| | | | llvm-svn: 129672
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-251-1/+1
| | | | llvm-svn: 124210
* Add unnamed_addr to constructors and destructors.Rafael Espindola2011-01-111-1/+1
| | | | llvm-svn: 123197
* add missing newlines at end of file.Chris Lattner2010-12-211-1/+1
| | | | llvm-svn: 122309
* fix PR8726 by teaching the aggregate init optimization code to handle Chris Lattner2010-12-021-0/+13
| | | | | | structs with references in them correctly. llvm-svn: 120722
* Preserve the zero-initialization and construction-kind settings whenDouglas Gregor2010-08-221-0/+26
| | | | | | instantiating CXXConstructExpr expressions. llvm-svn: 111780
* When performing value-initialization for a class with a non-trivial,Douglas Gregor2010-08-221-0/+18
| | | | | | | | | | | | implicitly-defined default constructor, zero-initialize the memory before calling the default constructor. Previously, we would only zero-initialize in the case of a trivial default constructor. Also, simplify the hideous logic that determines when we have a trivial default constructor and, therefore, don't need to emit any call at all. llvm-svn: 111779
* Fix a major regression with value-initialization of class types withDouglas Gregor2010-08-201-0/+27
| | | | | | | | trivial default constructors. We're weren't zero-initializing them, which manifested as <rdar://problem/8320532> (a regression in the GCC test suite) and is likely to have caused significant other breakage. llvm-svn: 111650
* Inline a special case of EmitAggregateCopy into EmitNullInitializationJohn McCall2010-08-071-0/+18
| | | | | | | | | to avoid the awesome-but-wrong-in-this-case assertion in the canon EAC. Fixes PR7834. Also fix a subtle address-space bug in the memset path. llvm-svn: 110511
* When explicitly building a temporary object (CXXTemporaryObjectExpr),Douglas Gregor2010-04-271-0/+26
| | | | | | | | | | | keep track of whether we need to zero-initialize storage prior to calling its constructor. Previously, we were only tracking this when implicitly constructing the object (a CXXConstructExpr). Fixes Boost's value-initialization tests, which means that the Boost.Config library now passes all of its tests. llvm-svn: 102461
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-041-1/+1
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100305
* Revert r100193 since it causes failures in objc in clangMon P Wang2010-04-021-1/+1
| | | | llvm-svn: 100200
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-021-1/+1
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100193
* Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.Bob Wilson2010-03-301-1/+1
| | | | llvm-svn: 99949
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-1/+1
| | | | | | memmove, and memset llvm-svn: 99930
* Fix test case to unbreak testingDouglas Gregor2009-12-161-2/+2
| | | | llvm-svn: 91551
* When value-initializing a class with no user-defined constructors butDouglas Gregor2009-12-161-0/+25
with a non-trivial default constructor, zero-initialize the storage and then call the default constructor. Fixes PR5800. llvm-svn: 91548
OpenPOWER on IntegriCloud