summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't pass false (default) for isVolatile parameter to CreateStore.Daniel Dunbar2009-11-291-8/+8
| | | | llvm-svn: 90094
* Don't build the entire vtable when all we want is the index of a virtual method.Anders Carlsson2009-11-271-3/+3
| | | | llvm-svn: 90017
* Fix for PR5594: use EmitGlobalDefinition instead of EmitCXXDestructor so thatEli Friedman2009-11-271-3/+3
| | | | | | we check whether the vtable needs to be generated. llvm-svn: 89984
* Remove unused variable.Eli Friedman2009-11-261-1/+0
| | | | llvm-svn: 89945
* Shortcut explicit calls to a trivial copy assignment operator.Eli Friedman2009-11-261-0/+8
| | | | llvm-svn: 89944
* Simplify and fix up the handling of implicit constructors, copy assignmentEli Friedman2009-11-261-5/+9
| | | | | | | | operators, and destructors. Avoids generating declarations/definitions of trivial constructors/destructors, and makes sure the trivial copy assignment operator is generated when necessary. llvm-svn: 89943
* Add a CovariantThunkAdjustment struct that represents the adjustments needed ↵Anders Carlsson2009-11-261-50/+58
| | | | | | for a covariant thunk. llvm-svn: 89933
* Move the mangler into the CodeGen namespace. Change mangleThunk to take a ↵Anders Carlsson2009-11-261-2/+1
| | | | | | ThunkAdjustment. llvm-svn: 89930
* Add a ThunkAdjustment struct which holds a non-virtual and a virtual ↵Anders Carlsson2009-11-261-9/+15
| | | | | | adjustment offset. Start using it. General cleanup in Mangle.cpp. llvm-svn: 89925
* Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used ↵Anders Carlsson2009-11-251-2/+2
| | | | | | yet). llvm-svn: 89835
* Handle references correctly when synthesizing copy constructors.Anders Carlsson2009-11-241-8/+28
| | | | | | | | | | | With this change, the clang-on-clang test result is now Expected Passes : 224 Unexpected Failures: 37 Which means that we can compile over 80% of clang with clang! :) llvm-svn: 89799
* Handle cases where we're constructing an array of objects and the ↵Anders Carlsson2009-11-241-8/+32
| | | | | | constructor has default arguments. llvm-svn: 89783
* Handle base-to-derived casts. Will land test case shortly.Anders Carlsson2009-11-231-14/+14
| | | | llvm-svn: 89678
* IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,Daniel Dunbar2009-11-211-12/+7
| | | | | | | instead of requiring clients to make a raw_svector_ostream, which is just an implementation detail. llvm-svn: 89548
* Sink free mangle* methods into MangleContext.Daniel Dunbar2009-11-211-5/+5
| | | | llvm-svn: 89547
* Checkpoint current work. WIP.Mike Stump2009-11-201-6/+0
| | | | llvm-svn: 89513
* Reflow to fit 80-col.Mike Stump2009-11-181-2/+2
| | | | llvm-svn: 89222
* Refactor emitting call to delete operator into common function EmitDeleteCall.Eli Friedman2009-11-181-20/+3
| | | | llvm-svn: 89173
* Unify the way destructor epilogues are generated for synthesized and regular ↵Anders Carlsson2009-11-171-103/+79
| | | | | | destructors. Also fix PR5529. llvm-svn: 89034
* Fix up EmitMemberInitializer to handle many more cases.Eli Friedman2009-11-161-11/+24
| | | | llvm-svn: 88999
* Reorganize EmitMemberInitializer to put anonymous unions on the common codepath.Eli Friedman2009-11-161-29/+31
| | | | llvm-svn: 88995
* Make member initializers for union members work correctly.Eli Friedman2009-11-161-1/+1
| | | | llvm-svn: 88989
* Implement a few more cases for copy constructor synthesis.Eli Friedman2009-11-161-2/+10
| | | | llvm-svn: 88971
* Fix a couple of cases where we weren't generating the right kind of callEli Friedman2009-11-161-8/+19
| | | | | | for a call to a virtual function. llvm-svn: 88891
* When generating the deleting ctor, emit a call to delete.Anders Carlsson2009-11-151-4/+24
| | | | llvm-svn: 88878
* PR5483: Generate missing form of destructor when it is virtual. (SomeoneEli Friedman2009-11-141-0/+2
| | | | | | | more familiar with this stuff should double-check that there isn't some more general rule; this is purely from inspecting g++ output.) llvm-svn: 88755
* Code gen. For virtual destructor call on array objectsFariborz Jahanian2009-11-131-1/+10
| | | | | | (still part of pr5472). llvm-svn: 88712
* Code gen for arrady delete operator. Fixes pr5472.Fariborz Jahanian2009-11-131-4/+13
| | | | llvm-svn: 88680
* Instead of storing CXXMethodDecls in the vtable builder, store GlobalDecls ↵Anders Carlsson2009-11-131-1/+1
| | | | | | | | so we can represent both the complete and deleting destructors. Also, when encountering a destructor decl, emit entries for both the complete and deleting destructors. Mike, please review. With this change, FileCheck builds and runs the clang test suite without failures! llvm-svn: 88663
* Add a special BuildVirtualCall that's going to be used for building calls to ↵Anders Carlsson2009-11-131-11/+26
| | | | | | | | | | | | | | | | destructors. This is needed because when compiling: struct A { virtual ~A(); }; void f(A* a) { delete a; } A's deleting destructor should be called. llvm-svn: 87083
* Fix two bugs with temporaries:Anders Carlsson2009-11-131-2/+7
| | | | | | | | | | | | | | | | | | | | | | 1. For A f() { return A(); } we were incorrectly calling the A destructor on the returned object. 2. For void f(A); void g() { A a; f(a); } we were incorrectly not calling the copy constructor. llvm-svn: 87082
* Value initialize non-class array members in ctor'sFariborz Jahanian2009-11-111-1/+8
| | | | | | initializer list. Fixes PR5463. llvm-svn: 86849
* Avoid generating additional destructor(s) for initialized constructedFariborz Jahanian2009-11-111-0/+3
| | | | | | objects. llvm-svn: 86778
* This patch implements Code gen. for destruction ofFariborz Jahanian2009-11-101-7/+63
| | | | | | global array of objects. llvm-svn: 86701
* Add vtable caching to prevent multiple vtables for the same class fromMike Stump2009-11-101-1/+1
| | | | | | | | being generated. Add the most derived vtable pointer to the VTT. llvm-svn: 86671
* Unify the codepaths used to verify base and member initializers for explicitlyEli Friedman2009-11-091-58/+0
| | | | | | | | | | | | | | | | and implicitly defined constructors. This has a number of benefits: 1. Less code. 2. Explicit and implicit constructors get the same diagnostics. 3. The AST explicitly contains constructor calls from implicit default constructors. This allows handing some cases that previously weren't handled correctly in IRGen without any additional code. Specifically, implicit default constructors containing calls to constructors with default arguments are now handled correctly. llvm-svn: 86500
* This patch fixes code gen. part of pr5333 (ConversionFariborz Jahanian2009-11-061-1/+3
| | | | | | using elipsis conversion). llvm-svn: 86276
* If a member initializer create temporaries we need to destroy them. Fixes ↵Anders Carlsson2009-11-061-0/+7
| | | | | | PR5077. llvm-svn: 86225
* More cleanup.Anders Carlsson2009-11-061-73/+94
| | | | llvm-svn: 86224
* References can't be zero; omit zero check for return value adjustmentsMike Stump2009-11-051-19/+25
| | | | | | in covariant thunks that return references. llvm-svn: 86121
* Refine covariant return value adjustments for thunks when nullMike Stump2009-11-051-1/+19
| | | | | | pointers are returned. llvm-svn: 86120
* Add code gen for pointer-to-member function inFariborz Jahanian2009-11-041-0/+2
| | | | | | ctor's initializer. Fixes pr5178. llvm-svn: 86040
* Store the unresolved class type in MemberPointerType's Class field,Douglas Gregor2009-11-041-1/+1
| | | | | | from Peter Collingbourne! llvm-svn: 86030
* Fix 80-col violations.Mike Stump2009-11-041-15/+19
| | | | llvm-svn: 85990
* Split out return adjustments in thunks from this adjustment in thunksMike Stump2009-11-041-2/+9
| | | | | | | so the optimizer can tailcall into the return value adjustment thunk. This improves codesize for complex hierarchies. llvm-svn: 85988
* Misc cleanups.Mike Stump2009-11-031-2/+0
| | | | llvm-svn: 85978
* Refine volatile handling, specifically, we must have the canonicalMike Stump2009-11-031-3/+4
| | | | | | | type to look at the volatile specifier. I found these all from just hand auditing the code. llvm-svn: 85967
* Refine return value adjustments for thunks.Mike Stump2009-11-031-28/+37
| | | | llvm-svn: 85905
* Refine codegen for non-virtual this adjustments for thunks.Mike Stump2009-11-031-5/+12
| | | | llvm-svn: 85856
* Add virtual adjustments for this for thunks.Mike Stump2009-11-031-2/+30
| | | | llvm-svn: 85852
OpenPOWER on IntegriCloud