summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Add cleanups for exceptional edges. WIP.Mike Stump2009-12-091-7/+48
| | | | llvm-svn: 90940
* Fix for PR5707: make sure implicit copy constructors initialize the vtableEli Friedman2009-12-081-0/+2
| | | | | | pointer. llvm-svn: 90840
* Add codegen support for exception specifications. WIP.Mike Stump2009-12-071-0/+6
| | | | llvm-svn: 90817
* implement rdar://7346691 by codegen'ing struct/array initializersChris Lattner2009-12-051-2/+11
| | | | | | to a memset or a memcpy from a global when possible. llvm-svn: 90658
* Add support for function try blocks.Mike Stump2009-12-041-0/+6
| | | | llvm-svn: 90622
* Make functions returning a struct indirectly evaluate the returned structEli Friedman2009-12-041-1/+1
| | | | | | | directly into the sret pointer. This is an optimization in C, but is required for correctness in C++ for classes with a non-trivial copy constructor. llvm-svn: 90526
* Minor cleanup.Eli Friedman2009-12-031-2/+2
| | | | llvm-svn: 90411
* Add support for thunking dtors. Oh why does this make my head hurt?Mike Stump2009-12-031-2/+2
| | | | llvm-svn: 90409
* More exception handling improvements... WIP.Mike Stump2009-12-021-8/+19
| | | | | | | | | | | Highlights include: Add a helper to generate __cxa_free_exception and _ZSt9terminatev. Add a region to handle EH object deallocation for ctor failures for throw. Add a terminate handler for __cxa_end_catch. A framework for adding cleanup actions for the exceptional edges only. llvm-svn: 90305
* Reflow comments and fix 80-col violation.Mike Stump2009-11-301-29/+27
| | | | llvm-svn: 90152
* Add a CovariantThunkAdjustment struct that represents the adjustments needed ↵Anders Carlsson2009-11-261-5/+6
| | | | | | for a covariant thunk. llvm-svn: 89933
* Add a ThunkAdjustment struct which holds a non-virtual and a virtual ↵Anders Carlsson2009-11-261-1/+2
| | | | | | 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/+7
| | | | | | yet). llvm-svn: 89835
* Eliminate CXXConditionDeclExpr with extreme prejudice.Douglas Gregor2009-11-251-1/+0
| | | | | | | | | | | | | | | | | All statements that involve conditions can now hold on to a separate condition declaration (a VarDecl), and will use a DeclRefExpr referring to that VarDecl for the condition expression. ForStmts now have such a VarDecl (I'd missed those in previous commits). Also, since this change reworks the Action interface for if/while/switch/for, use FullExprArg for the full expressions in those expressions, to ensure that we're emitting Note that we are (still) not generating the right cleanups for condition variables in for statements. That will be a follow-on commit. llvm-svn: 89817
* Clean up the AST for while loops and fix several problems withDouglas Gregor2009-11-241-1/+20
| | | | | | | | | | | | | | | | | cleanups for while loops: 1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g., while (shared_ptr<WorkInt> p = getWorkItem()) { // ... } 2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g., while (blah) RAIIObject raii(blah+1); llvm-svn: 89800
* Handle cases where we're constructing an array of objects and the ↵Anders Carlsson2009-11-241-2/+7
| | | | | | constructor has default arguments. llvm-svn: 89783
* Introduce cleanup scopes for "if" statements in two places:Douglas Gregor2009-11-241-0/+25
| | | | | | | | | | | | | | | | - Outside the "if", to ensure that we destroy the condition variable at the end of the "if" statement rather than at the end of the block containing the "if" statement. - Inside the "then" and "else" branches, so that we emit then- or else-local cleanups at the end of the corresponding block when the block is not a compound statement. To make adding these new cleanup scopes easier (and since switch/do/while will all need the same treatment), added the CleanupScope RAII object to introduce a new cleanup scope and make sure it gets cleaned up. llvm-svn: 89773
* Rename CleanupScope -> DelayedCleanupBlock. No functionality change.Douglas Gregor2009-11-241-4/+4
| | | | llvm-svn: 89769
* Handle base-to-derived casts. Will land test case shortly.Anders Carlsson2009-11-231-4/+9
| | | | llvm-svn: 89678
* Fix lifetime of conditional temporaries. Patch by Victor Zverovich!Anders Carlsson2009-11-201-12/+16
| | | | llvm-svn: 89467
* Add an assertion to catch bad calls to EmitCallArgs.Eli Friedman2009-11-181-0/+1
| | | | llvm-svn: 89190
* Missing piece of r89173.Eli Friedman2009-11-181-0/+3
| | | | llvm-svn: 89174
* More const is always good.Anders Carlsson2009-11-171-2/+2
| | | | llvm-svn: 89033
* Implement most of dynamic_cast. WIP.Mike Stump2009-11-161-0/+1
| | | | llvm-svn: 88901
* Implement typeid for class types.Mike Stump2009-11-151-1/+4
| | | | llvm-svn: 88843
* Code gen for arrady delete operator. Fixes pr5472.Fariborz Jahanian2009-11-131-0/+4
| | | | llvm-svn: 88680
* Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.Daniel Dunbar2009-11-131-1/+1
| | | | llvm-svn: 87087
* Add a special BuildVirtualCall that's going to be used for building calls to ↵Anders Carlsson2009-11-131-1/+4
| | | | | | | | | | | | | | | | 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
* This patch implements Code gen. for destruction ofFariborz Jahanian2009-11-101-1/+5
| | | | | | global array of objects. llvm-svn: 86701
* Add vtable caching to prevent multiple vtables for the same class fromMike Stump2009-11-101-6/+0
| | | | | | | | being generated. Add the most derived vtable pointer to the VTT. llvm-svn: 86671
* Be sure to clear out VCall when we clear out VCalls.Mike Stump2009-11-101-0/+3
| | | | | | Start implementing VTTs. WIP. llvm-svn: 86650
* Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended ↵Anders Carlsson2009-11-071-1/+2
| | | | | | functionality change. llvm-svn: 86407
* indirectbr seems to work! Rip out the old code.Chris Lattner2009-11-061-20/+0
| | | | llvm-svn: 86256
* This patch extends CleanupScope to support destructionFariborz Jahanian2009-11-041-12/+25
| | | | | | of array objects on block exit. Patch is by Anders Calrsson. llvm-svn: 86032
* Refine volatile handling, specifically, we must have the canonicalMike Stump2009-11-031-1/+1
| | | | | | | 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-0/+5
| | | | llvm-svn: 85905
* Add CGException.cpp, to be used for exception related code generation.Anders Carlsson2009-10-301-0/+2
| | | | llvm-svn: 85560
* optimize out some ifdefs.Chris Lattner2009-10-291-4/+0
| | | | llvm-svn: 85453
* Implement clang support for indirect branch and address of labelChris Lattner2009-10-281-0/+18
| | | | | | | | using the new LLVM support for this. This is temporarily hiding behind horrible and ugly #ifdefs until the time when the optimizer is stable (hopefully a week or so). Until then, lets make it "opt in" :) llvm-svn: 85446
* Eliminate QualifiedDeclRefExpr, which captured the notion of aDouglas Gregor2009-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | qualified reference to a declaration that is not a non-static data member or non-static member function, e.g., namespace N { int i; } int j = N::i; Instead, extend DeclRefExpr to optionally store the qualifier. Most clients won't see or care about the difference (since QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the number of top-level expression types that clients need to cope with, brings the implementation of DeclRefExpr into line with MemberExpr, and simplifies and unifies our handling of declaration references. Extended DeclRefExpr to (optionally) store explicitly-specified template arguments. This occurs when naming a declaration via a template-id (which will be stored in a TemplateIdRefExpr) that, following template argument deduction and (possibly) overload resolution, is replaced with a DeclRefExpr that refers to a template specialization but maintains the template arguments as written. llvm-svn: 84962
* Complete code gen for '.*' binary expression forFariborz Jahanian2009-10-221-1/+2
| | | | | | both scalar and aggregates. llvm-svn: 84910
* Code gen for pointer-to-datamember - WIP.Fariborz Jahanian2009-10-211-0/+1
| | | | llvm-svn: 84771
* Prep work to always preallocate BlockDeclRefExprs so that we canMike Stump2009-10-211-0/+1
| | | | | | | generate the debug information for the first parameter to the block invoke functions. WIP. llvm-svn: 84737
* Code-gen for CXXZeroInitValueExpr AST passedFariborz Jahanian2009-10-201-1/+2
| | | | | | as argument to a function call. Removes a FIXME. llvm-svn: 84694
* Twinify CodeGenFunction::CreateTempAllocaDaniel Dunbar2009-10-191-1/+2
| | | | llvm-svn: 84456
* reimplement codegen for indirect goto with the following advantages:Chris Lattner2009-10-131-8/+7
| | | | | | | | | | | | | 1. CGF now has fewer bytes of state (one pointer instead of a vector). 2. The generated code is determinstic, instead of getting labels in 'map order' based on pointer addresses. 3. Clang now emits one 'indirect goto switch' for each function, instead of one for each indirect goto. This fixes an M*N = N^2 IR size issue when there are lots of address-taken labels and lots of indirect gotos. 4. This also makes the default cause do something useful, reducing the size of the jump table needed (by one). llvm-svn: 83952
* Change GetAddressCXXOfBaseClass to use CXXBasePaths for calculating base ↵Anders Carlsson2009-10-061-0/+5
| | | | | | class offsets. Fix the code to handle virtual bases as well. llvm-svn: 83426
* Implement code generation of member function pointer calls. Fixes PR5121.Anders Carlsson2009-10-031-0/+2
| | | | llvm-svn: 83271
* Move some functions from CodeGenFunctions to CodeGenModule so they can be ↵Anders Carlsson2009-10-031-5/+0
| | | | | | used by CGExprConstant. llvm-svn: 83263
* Handle CK_BaseToDerivedMemberPointer for member function pointers. Fixes PR5091.Anders Carlsson2009-09-291-0/+5
| | | | llvm-svn: 83041
OpenPOWER on IntegriCloud