summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/constructor-init.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[CodeGenCXX] Treat 'this' as noalias in constructors"Sean Fertile2018-10-151-5/+5
| | | | | | | This reverts commit https://reviews.llvm.org/rL344150 which causes MachineOutliner related failures on the ppc64le multistage buildbot. llvm-svn: 344526
* [CodeGenCXX] Treat 'this' as noalias in constructorsAnton Bikineev2018-10-101-5/+5
| | | | | | | | | This is currently a clang extension and a resolution of the defect report in the C++ Standard. Differential Revision: https://reviews.llvm.org/D46441 llvm-svn: 344150
* Remove custom handling of array copies in lambda by-value array capture andRichard Smith2016-12-141-7/+4
| | | | | | | | | | | copy constructors of classes with array members, instead using ArrayInitLoopExpr to represent the initialization loop. This exposed a bug in the static analyzer where it was unable to differentiate between zero-initialized and unknown array values, which has also been fixed here. llvm-svn: 289618
* CodeGen: Start using inrange annotations on vtable getelementptr.Peter Collingbourne2016-12-131-3/+3
| | | | | | | | | | | | This annotation allows the optimizer to split vtable groups, as permitted by a change to the Itanium ABI [1] that prevents compilers from adjusting virtual table pointers between virtual tables. [1] https://github.com/MentorEmbedded/cxx-abi/pull/7 Differential Revision: https://reviews.llvm.org/D24431 llvm-svn: 289585
* CodeGen: New vtable group representation: struct of vtable arrays.Peter Collingbourne2016-12-131-3/+3
| | | | | | | | | In a future change, this representation will allow us to use the new inrange annotation on getelementptr to allow the optimizer to split vtable groups. Differential Revision: https://reviews.llvm.org/D22296 llvm-svn: 289584
* CodeGen: Use 32-bit gep offsets to address vtable address points.Peter Collingbourne2016-03-141-3/+3
| | | | | | | | | | | | | | | | | The relative vtable ABI will use a struct rather than an array as the type of a vtable. LLVM only allows 32-bit integers as struct indices, so we need to use 32-bit integers to get addresses of address points. In order to keep the code simple, we might as well do that unconditionally. It's probably a reasonable implementation limit to support no more than 2 billion virtual functions per class. This change causes quite a bit of churn in the test suite, so I'm making it separately. Differential Revision: http://reviews.llvm.org/D18113 llvm-svn: 263469
* Test case updates for explicit type parameter to the gep operatorDavid Blaikie2015-03-131-3/+3
| | | | llvm-svn: 232187
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-2/+2
| | | | llvm-svn: 230795
* Update Clang tests to handle explicitly typed gep changes in LLVM.David Blaikie2015-02-271-1/+1
| | | | llvm-svn: 230783
* Emit DeferredDeclsToEmit in a DFS order.Rafael Espindola2015-01-221-9/+11
| | | | | | | | | | | | | | Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that. The advantages of the change are that * The output order is a bit closer to the source order. The change to test/CodeGenCXX/pod-member-memcpys.cpp is a good example. * If we decide to deffer more, it will not cause as large changes in the estcases as it would without this patch. llvm-svn: 226751
* Cast vtable address points to i32 (...)** to enable more globaloptReid Kleckner2014-12-031-6/+6
| | | | | | | | | | | | We currently use i32 (...)** as the type of the vptr field in the LLVM struct type. LLVM's GlobalOpt prefers any bitcasts to be on the side of the data being stored rather than on the pointer being stored to. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D5916 llvm-svn: 223267
* Mark C++ reference parameters as dereferenceableHal Finkel2014-07-181-1/+1
| | | | | | | | | | | | | | Because references must be initialized using some evaluated expression, they must point to something, and a callee can assume the reference parameter is dereferenceable. Taking advantage of a new attribute just added to LLVM, mark them as such. Because dereferenceability in addrspace(0) implies nonnull in the backend, we don't need both attributes. However, we need to know the size of the object to use the dereferenceable attribute, so for incomplete types we still emit only nonnull. llvm-svn: 213386
* Add 'nonnull' parameter or return attribute when producing an llvm pointer ↵Nick Lewycky2014-05-281-1/+1
| | | | | | type in a function type where the C++ type is a reference. Update the tests. llvm-svn: 209723
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-8/+8
| | | | | | tests fail. llvm-svn: 188447
* PR13273: When performing list-initialization with an empty initializer list,Richard Smith2012-07-051-0/+20
| | | | | | | | | | | actually perform value initialization rather than trying to fake it with a call to the default constructor. Fixes various bugs related to the previously-missing zero-initialization in this case. I've also moved this and the other list initialization 'special case' from TryConstructorInitialization into TryListInitialization where they belong. llvm-svn: 159733
* Special members which are defaulted or deleted on their first declaration areRichard Smith2012-02-261-2/+1
| | | | | | | | | | | | | trivial if the implicit declaration would be. Don't forget to set the Trivial flag on the special member as well as on the class. It doesn't seem ideal that we have two separate mechanisms for storing this information, but this patch does not attempt to address that. This leaves us in an interesting position where the has_trivial_X trait for a class says 'yes' for a deleted but trivial X, but is_trivially_Xable says 'no'. This seems to be what the standard requires. llvm-svn: 151465
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Explicitly-defaulted copy/move constructors are not "implicit", butDouglas Gregor2011-09-221-1/+73
| | | | | | | they still need the logic to cope with array member initialization. Fixes PR10720. llvm-svn: 140302
* Fix testcaseDouglas Gregor2011-07-011-16/+16
| | | | llvm-svn: 134262
* Don't zero-initialize default-initialized local variables that haveDouglas Gregor2011-07-011-0/+16
| | | | | | | | trivial default constructors. This generated-code regression was caused by r131796, which had simplified the handling of default initialization in Sema. Fixes <rdar://problem/9694300>. llvm-svn: 134260
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-251-3/+3
| | | | llvm-svn: 124210
* Add unnamed_addr to constructors and destructors.Rafael Espindola2011-01-111-3/+3
| | | | llvm-svn: 123197
* Fix test for no-asserts builds.John McCall2010-09-171-1/+1
| | | | llvm-svn: 114185
* Currently we're initializing the vtable pointers of a class only afterJohn McCall2010-09-171-0/+32
| | | | | | | | | | | | | | | the bases are completely initialized. This won't work --- base initializer expressions can rely on the vtables having been set up. Check for uses of 'this' in the initializers and force a vtable initialization if found. This might not be good enough; we might need to extend this to handle the possibility of arbitrary code finding an external reference to this (not yet completely-constructed!) object and accessing through it, in which case we'll probably find ourselves doing a lot more unnecessary stores. llvm-svn: 114153
* When adding initializers to a constructor, be sure that we are lookingDouglas Gregor2010-03-261-0/+21
| | | | | | | | through the bases and fields of the definition of the class in which the constructor is declared, rather than some other declaration of that class. llvm-svn: 99661
* Switch more of Sema::CheckInitializerTypes over toDouglas Gregor2009-12-191-1/+22
| | | | | | | | | | InitializationSequence. Specially, switch initialization of a C++ class type (either copy- or direct-initialization). Also, make sure that we create an elidable copy-construction when performing copy initialization of a C++ class variable. Fixes PR5826. llvm-svn: 91750
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-13/+14
| | | | llvm-svn: 81346
* Array member construction in prologue of user-declaredFariborz Jahanian2009-08-211-0/+3
| | | | | | constructors. llvm-svn: 79640
* Patch to provide cast of objects in member accessFariborz Jahanian2009-07-291-2/+4
| | | | | | | excpression, if needed, and remove some ir-gen code now unnencessary. llvm-svn: 77490
* More cleanup of data member access and then some.Fariborz Jahanian2009-07-281-0/+3
| | | | llvm-svn: 77351
* More work toward data member access ir-gen.Fariborz Jahanian2009-07-281-0/+3
| | | | llvm-svn: 77332
* ir-gen for non-virtual base class initializationFariborz Jahanian2009-07-251-0/+49
in constructors. llvm-svn: 77087
OpenPOWER on IntegriCloud