summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/virtual-bases.cpp
Commit message (Collapse)AuthorAgeFilesLines
* IR: print value numbers for unnamed function argumentsTim Northover2019-08-031-2/+2
| | | | | | | | | | For consistency with normal instructions and clarity when reading IR, it's best to print the %0, %1, ... names of function arguments in definitions. Also modifies the parser to accept IR in that form for obvious reasons. llvm-svn: 367755
* Revert "[CodeGenCXX] Treat 'this' as noalias in constructors"Sean Fertile2018-10-151-10/+10
| | | | | | | 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-10/+10
| | | | | | | | | 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
* IRgen: Mark aliases of ctors and dtors as unnamed_addr.Peter Collingbourne2018-06-181-1/+1
| | | | | | | | | This is not only semantically correct but ensures that they will not be marked as address-significant once D48155 lands. Differential Revision: https://reviews.llvm.org/D48206 llvm-svn: 334982
* [CodeGen] Use the non-virtual alignment when emitting the baseAkira Hatanaka2018-01-271-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constructor. Previously, clang would emit an over-aligned (16-byte) store to initialize B::x in B's base constructor when compiling the following code: struct A { __attribute__((aligned(16))) double data1; }; struct B : public virtual A { B() : x(123) {} double a; int x; }; struct C : public virtual B {}; void test() { B b; C c; } This was happening because the code in IRGen that does member initialization was using the alignment of a complete object instead of the non-virtual alignment. This commit fixes the bug. rdar://problem/36382481 Differential Revision: https://reviews.llvm.org/D42521 llvm-svn: 323578
* Output destructors and constructors in a more natural order.Rafael Espindola2013-12-091-2/+2
| | | | | | | | | | | | | | | | With this patch we output the in the order C2 C1 D2 D1 D0 Which means that a destructor or constructor that call another is output after the callee. This is a bit easier to read IHMO and a tiny bit more efficient as we don't put a decl in DeferredDeclsToEmit. llvm-svn: 196784
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-6/+6
| | | | | | tests fail. llvm-svn: 188447
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-2/+2
| | | | llvm-svn: 134831
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-251-6/+6
| | | | llvm-svn: 124210
* Add unnamed_addr to constructors and destructors.Rafael Espindola2011-01-111-6/+6
| | | | llvm-svn: 123197
* When collecting virtual bases it's very important to use the canonical type ↵Anders Carlsson2010-03-291-0/+23
| | | | | | of the base class. Otherwise, we might add the same virtual base class twice if the virtual base is an instantiated template. Fixes PR6251. llvm-svn: 99829
* Re-introduce the ctor/dtor alias optimization, this time hidden behind aJohn McCall2010-02-191-2/+2
| | | | | | command-line option which defaults off. llvm-svn: 96649
* Revert the ctor/dtor alias optimization for now; the buildbots can detectJohn McCall2010-02-181-3/+3
| | | | | | some failure here that I can't. llvm-svn: 96612
* Emit complete constructors and destructors as aliases to base constructorsJohn McCall2010-02-171-3/+3
| | | | | | | | and destructors when the two entities are semantically identical, i.e. when the class has no virtual base classes. We only do this for linkage types for which aliases are supported, i.e. internal and external, i.e. not linkonce. llvm-svn: 96451
* Use the correct function info for constructors when applying function ↵Anders Carlsson2010-02-061-0/+8
| | | | | | attributes. Fixes PR6245. llvm-svn: 95474
* 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
* Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used ↵Anders Carlsson2009-11-251-0/+17
yet). llvm-svn: 89835
OpenPOWER on IntegriCloud