Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | More work towards getting rid of OldGetAddressOfBaseClass. | Anders Carlsson | 2010-05-03 | 1 | -1/+10 | |
| | | | | llvm-svn: 102887 | |||||
* | Get rid of a call to GetAddressOfDirectBaseInCompleteClass. | Anders Carlsson | 2010-05-02 | 1 | -4/+7 | |
| | | | | llvm-svn: 102886 | |||||
* | Have getSubVTTIndex take a BaseSubobject instead of just a base. | Anders Carlsson | 2010-05-02 | 1 | -1/+7 | |
| | | | | llvm-svn: 102885 | |||||
* | Pass ForVirtualBase all the way to GetVTTParameter. | Anders Carlsson | 2010-05-02 | 1 | -4/+8 | |
| | | | | llvm-svn: 102883 | |||||
* | Add the same 'ForVirtualBase' parameter to EmitCXXDestructorCall. | Anders Carlsson | 2010-05-02 | 1 | -8/+13 | |
| | | | | llvm-svn: 102882 | |||||
* | Revert my last change and add a 'ForVirtualBase' parameter to ↵ | Anders Carlsson | 2010-05-02 | 1 | -5/+2 | |
| | | | | | | EmitCXXConstructorCall instead. llvm-svn: 102881 | |||||
* | Pass the construction kind down to EmitCXXConstructorCall. | Anders Carlsson | 2010-05-02 | 1 | -2/+6 | |
| | | | | llvm-svn: 102880 | |||||
* | Remove another unused function. | Anders Carlsson | 2010-05-02 | 1 | -36/+0 | |
| | | | | llvm-svn: 102871 | |||||
* | Remove an unused function. | Anders Carlsson | 2010-05-02 | 1 | -83/+0 | |
| | | | | llvm-svn: 102870 | |||||
* | Complete reimplementation of the synthesis for implicitly-defined copy | Douglas Gregor | 2010-05-01 | 1 | -92/+0 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assignment operators. Previously, Sema provided type-checking and template instantiation for copy assignment operators, then CodeGen would synthesize the actual body of the copy constructor. Unfortunately, the two were not in sync, and CodeGen might pick a copy-assignment operator that is different from what Sema chose, leading to strange failures, e.g., link-time failures when CodeGen called a copy-assignment operator that was not instantiation, run-time failures when copy-assignment operators were overloaded for const/non-const references and the wrong one was picked, and run-time failures when by-value copy-assignment operators did not have their arguments properly copy-initialized. This implementation synthesizes the implicitly-defined copy assignment operator bodies in Sema, so that the resulting ASTs encode exactly what CodeGen needs to do; there is no longer any special code in CodeGen to synthesize copy-assignment operators. The synthesis of the body is relatively simple, and we generate one of three different kinds of copy statements for each base or member: - For a class subobject, call the appropriate copy-assignment operator, after overload resolution has determined what that is. - For an array of scalar types or an array of class types that have trivial copy assignment operators, construct a call to __builtin_memcpy. - For an array of class types with non-trivial copy assignment operators, synthesize a (possibly nested!) for loop whose inner statement calls the copy constructor. - For a scalar type, use built-in assignment. This patch fixes at least a few tests cases in Boost.Spirit that were failing because CodeGen picked the wrong copy-assignment operator (leading to link-time failures), and I suspect a number of undiagnosed problems will also go away with this change. Some of the diagnostics we had previously have gotten worse with this change, since we're going through generic code for our type-checking. I will improve this in a subsequent patch. llvm-svn: 102853 | |||||
* | Simplify EmitCopyCtorCall. | Anders Carlsson | 2010-05-01 | 1 | -12/+5 | |
| | | | | llvm-svn: 102849 | |||||
* | Simplify EmitClassAggrMemberwiseCopy. | Anders Carlsson | 2010-05-01 | 1 | -18/+7 | |
| | | | | llvm-svn: 102848 | |||||
* | Clean up EmitClassMemberwiseCopy further. | Anders Carlsson | 2010-05-01 | 1 | -20/+9 | |
| | | | | llvm-svn: 102846 | |||||
* | Get rid of a parameter from EmitClassMemberwiseCopy. | Anders Carlsson | 2010-05-01 | 1 | -3/+3 | |
| | | | | llvm-svn: 102845 | |||||
* | When defining implicit copy constructors, use SetBaseOrMemberInitializers to ↵ | Anders Carlsson | 2010-05-01 | 1 | -12/+0 | |
| | | | | | | initialize the bases. llvm-svn: 102842 | |||||
* | Remove an unnecessary parameter from EmitClassCopyAssignment. | Anders Carlsson | 2010-04-30 | 1 | -11/+6 | |
| | | | | llvm-svn: 102747 | |||||
* | Account for the VTT argument when making an implicit copy constructor for | John McCall | 2010-04-30 | 1 | -1/+13 | |
| | | | | | | | | | a class with virtual bases. Just a patch until Sema starts (correctly) doing most of this analysis. Fixes PR 6622. llvm-svn: 102692 | |||||
* | Get the base class addresses before calling EmitClassCopyAssignment. | Anders Carlsson | 2010-04-30 | 1 | -5/+8 | |
| | | | | llvm-svn: 102676 | |||||
* | Remove an unnecessary argument to EmitClassCopyAssignment. | Anders Carlsson | 2010-04-29 | 1 | -9/+7 | |
| | | | | llvm-svn: 102674 | |||||
* | Land another cleanup patch. | Anders Carlsson | 2010-04-25 | 1 | -14/+8 | |
| | | | | llvm-svn: 102293 | |||||
* | Revert enough of my patches to fix self-host again :( | Anders Carlsson | 2010-04-25 | 1 | -37/+76 | |
| | | | | llvm-svn: 102289 | |||||
* | Cleanup SynthesizeCXXCopyConstructor. | Anders Carlsson | 2010-04-24 | 1 | -16/+9 | |
| | | | | llvm-svn: 102286 | |||||
* | Clean up SynthesizeCXXCopyAssignment a little. | Anders Carlsson | 2010-04-24 | 1 | -15/+11 | |
| | | | | llvm-svn: 102285 | |||||
* | RenameGetAddressOfBaseOfCompleteClass to ↵ | Anders Carlsson | 2010-04-24 | 1 | -20/+20 | |
| | | | | | | GetAddressOfDirectBaseInCompleteClass to reflect that it only handles direct bases. llvm-svn: 102284 | |||||
* | More cleanup. | Anders Carlsson | 2010-04-24 | 1 | -23/+15 | |
| | | | | llvm-svn: 102282 | |||||
* | Simplify EmitClassMemberwiseCopy now that it's only used for fields. | Anders Carlsson | 2010-04-24 | 1 | -25/+13 | |
| | | | | llvm-svn: 102281 | |||||
* | DefineImplicitCopyConstructor now uses SetBaseOrMemberInitializers to create ↵ | Anders Carlsson | 2010-04-24 | 1 | -12/+0 | |
| | | | | | | implicit base initializers. (Member initializers are still handled by CodeGenFunction::SynthesizeCXXCopyConstructor for now). llvm-svn: 102279 | |||||
* | Rename GetAddressOfBaseClass to OldGetAddressOfBaseClass. | Anders Carlsson | 2010-04-24 | 1 | -48/+10 | |
| | | | | llvm-svn: 102275 | |||||
* | Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to ↵ | Anders Carlsson | 2010-04-24 | 1 | -25/+0 | |
| | | | | | | use the new version. llvm-svn: 102274 | |||||
* | Change CodeGenFunction::GetAddressOfDerivedClass to take a BasePath. | Anders Carlsson | 2010-04-24 | 1 | -7/+21 | |
| | | | | llvm-svn: 102273 | |||||
* | Convert more call sites over to the new GetAddressOfBaseClass. | Anders Carlsson | 2010-04-24 | 1 | -1/+1 | |
| | | | | llvm-svn: 102272 | |||||
* | Add a new GetAddressOfBaseClass overload that takes a base path and. Use it ↵ | Anders Carlsson | 2010-04-24 | 1 | -0/+104 | |
| | | | | | | for derived-to-base casts. llvm-svn: 102270 | |||||
* | Comment out an assert for now. | Anders Carlsson | 2010-04-21 | 1 | -0/+3 | |
| | | | | llvm-svn: 102007 | |||||
* | Back out r101911 and see if it makes the bots happy. | Anders Carlsson | 2010-04-20 | 1 | -28/+13 | |
| | | | | llvm-svn: 101921 | |||||
* | Fix a bug which triggered the assertion I added yesterday. Basically, when ↵ | Anders Carlsson | 2010-04-20 | 1 | -13/+28 | |
| | | | | | | we initialize the vtable pointer for a virtual base, and there was another path from the most derived class to another base with the same class type, we would use the wrong base. llvm-svn: 101911 | |||||
* | Move code to apply a non-virtual and virtual offset out into a separate ↵ | Anders Carlsson | 2010-04-20 | 1 | -19/+31 | |
| | | | | | | function. llvm-svn: 101909 | |||||
* | Pass the nearest virtual base decl to InitializeVTablePointers. No ↵ | Anders Carlsson | 2010-04-20 | 1 | -10/+7 | |
| | | | | | | functionality change right now. llvm-svn: 101872 | |||||
* | Assert that the path from the derived to the base class in ↵ | Anders Carlsson | 2010-04-20 | 1 | -0/+7 | |
| | | | | | | CodeGenFunction::GetAddressOfBaseClass is not ambiguous. llvm-svn: 101869 | |||||
* | Keep track of the actual storage specifier written on a variable or | Douglas Gregor | 2010-04-19 | 1 | -0/+1 | |
| | | | | | | | | function declaration, since it may end up being changed (e.g., "extern" can become "static" if a prior declaration was static). Patch by Enea Zaffanella and Paolo Bolzoni. llvm-svn: 101826 | |||||
* | Have the CXXBaseOrMemberInitializer keep track of whether an initializer ↵ | Anders Carlsson | 2010-04-12 | 1 | -11/+1 | |
| | | | | | | initializes a virtual base or not. llvm-svn: 101004 | |||||
* | the big refactoring bits of PR3782. | Rafael Espindola | 2010-03-30 | 1 | -1/+1 | |
| | | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. llvm-svn: 99920 | |||||
* | Remove the old vtable layout code. | Anders Carlsson | 2010-03-30 | 1 | -36/+0 | |
| | | | | llvm-svn: 99869 | |||||
* | Use the new function in EmitClassAggrMemberwiseCopy, fixing the same assert ↵ | Anders Carlsson | 2010-03-30 | 1 | -15/+2 | |
| | | | | | | as seen in PR6628 but for arrays this time. llvm-svn: 99867 | |||||
* | Factor emitting a call to a copy constructor out into a separate function. | Anders Carlsson | 2010-03-30 | 1 | -40/+53 | |
| | | | | llvm-svn: 99866 | |||||
* | Introduce a CXXTemporariesCleanupScope RAII object and use it to cleanup the ↵ | Anders Carlsson | 2010-03-30 | 1 | -25/+21 | |
| | | | | | | temporaries code. llvm-svn: 99865 | |||||
* | Handle default arguments when calling copy constructors for bases or members ↵ | Anders Carlsson | 2010-03-30 | 1 | -0/+20 | |
| | | | | | | when synthesizing a copy constructor. Fixes PR6628. llvm-svn: 99864 | |||||
* | Flip the switch to always get vtables from the VTT when necessary, I've ↵ | Anders Carlsson | 2010-03-29 | 1 | -7/+3 | |
| | | | | | | verified that clang bootstraps with this. llvm-svn: 99800 | |||||
* | Cleanup, no functionality change. | Anders Carlsson | 2010-03-29 | 1 | -6/+1 | |
| | | | | llvm-svn: 99798 | |||||
* | Fix another thinko, so that flags don't depend on previous bases. | Anders Carlsson | 2010-03-29 | 1 | -5/+7 | |
| | | | | llvm-svn: 99791 | |||||
* | When generating base ctors/dtors, we need to lookup virtual bases using the ↵ | Anders Carlsson | 2010-03-29 | 1 | -4/+15 | |
| | | | | | | vtable. llvm-svn: 99790 |