summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
Commit message (Collapse)AuthorAgeFilesLines
...
* IRgen: Add CreateMemTemp, for creating an temporary memory object for a ↵Daniel Dunbar2010-02-091-1/+6
| | | | | | | | | | particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing. - This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome! PR6240. llvm-svn: 95648
* Use the right linkage for static variables inside C++ inline functions.Anders Carlsson2010-02-071-1/+2
| | | | llvm-svn: 95512
* IRgen: Factor out EmitAggExprToLValue.Daniel Dunbar2010-02-051-0/+4
| | | | llvm-svn: 95416
* Rename StartConditionalBranch/FinishConditionalBranch to ↵Anders Carlsson2010-02-041-4/+4
| | | | | | BeginConditionalBranch/EndConditionalBranch. llvm-svn: 95308
* Revert the new reference binding code; I came up with a way simpler solution ↵Anders Carlsson2010-02-031-4/+1
| | | | | | for the reference binding bug that is preventing self-hosting. llvm-svn: 95223
* Move pointer to data member emission to CodeGenModule and use it in ↵Anders Carlsson2010-02-021-2/+0
| | | | | | CGExprConstant. Fixes PR5674. llvm-svn: 95063
* Start creating CXXBindReferenceExpr nodes when binding complex types to ↵Anders Carlsson2010-01-311-0/+2
| | | | | | references. llvm-svn: 94964
* Some class related cleanup.Anders Carlsson2010-01-311-4/+3
| | | | llvm-svn: 94938
* Add a new EmitLValueForFieldInitialization that will be used for ↵Anders Carlsson2010-01-291-0/+8
| | | | | | initializing fields (and reference type fields in particular). llvm-svn: 94799
* Simplify EmitLValueForField - we can get whether the field is part of a ↵Anders Carlsson2010-01-291-1/+1
| | | | | | union or not from the FieldDecl (through its DeclContext). llvm-svn: 94798
* Use CharUnits for alignments in character units.Ken Dyck2010-01-261-1/+1
| | | | llvm-svn: 94571
* Fix a nasty bug where temporaries weren't marked as being conditional in ↵Anders Carlsson2010-01-241-0/+3
| | | | | | some cases. llvm-svn: 94341
* Roll out ASTContext::getTypeSizeInChars(), replacing instances ofKen Dyck2010-01-111-3/+4
| | | | | | | | | | "ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits ones as appropriate. Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, fromQuantity(), and getQuantity() for clarity. llvm-svn: 93153
* refactor pre/postinc logic into CGF and require the caller to pass in theChris Lattner2010-01-091-1/+5
| | | | | | lvalue to poke, no functionality change. llvm-svn: 93075
* Fix for PR5967: Make const-marking for LLVM globals correct for cases requiringEli Friedman2010-01-081-1/+3
| | | | | | | run-time initialization, and emit run-time initializers aggresively to avoid ordering issues with deferred globals. llvm-svn: 92976
* Get rid of more dead code.Eli Friedman2010-01-031-4/+0
| | | | llvm-svn: 92439
* Move address points to CGVtableInfo, no functionality change.Anders Carlsson2010-01-021-1/+1
| | | | llvm-svn: 92420
* Correctly pass VTT parameters to constructors and destructors. The VTTs ↵Anders Carlsson2010-01-021-0/+5
| | | | | | aren't yet used in the ctors/dtors, but that will follow. llvm-svn: 92409
* Pass the return value slot to all call exprs.Anders Carlsson2009-12-241-4/+8
| | | | llvm-svn: 92145
* Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us ↵Anders Carlsson2009-12-241-1/+3
| | | | | | halfway towards fixing PR5824. llvm-svn: 92142
* Pass ReturnValueSlot to EmitCall. No functionality change yet.Anders Carlsson2009-12-241-0/+1
| | | | llvm-svn: 92138
* Add a ReturnValueSlot class. Change the argument order in EmitCall to match ↵Anders Carlsson2009-12-241-1/+1
| | | | | | the other overload better. llvm-svn: 92136
* Work in progress for setting the vtable pointers for all bases correctly inEli Friedman2009-12-181-0/+6
| | | | | | | the constructor. This doesn't handle cases requiring the VTT at the moment, and generates unnecessary stores, but I think it's essentially correct. llvm-svn: 91731
* Implement additional undefined checks for additional loads and stores. WIP.Mike Stump2009-12-161-0/+8
| | | | llvm-svn: 91498
* Switch codegen for -fcatch-undefined-bahavior over to __builtin_trapMike Stump2009-12-151-4/+4
| | | | | | instead of abort to improve codesize and codegen. llvm-svn: 91374
* Add support for detecting undefined shift behavior. WIP.Mike Stump2009-12-141-5/+5
| | | | llvm-svn: 91341
* Implement runtime checks for undefined behavior. WIP.Mike Stump2009-12-121-0/+6
| | | | | | | | | | | | | This implements a new flag -fcatch-undefined-behavior. The flag turns on additional runtime checks for: T a[I]; a[i] abort when i < 0 or i >= I. Future stuff includes shifts by >= bitwidth amounts. llvm-svn: 91198
* Get rid of static variable.Eli Friedman2009-12-101-1/+2
| | | | llvm-svn: 91041
* Ensure we only generate one terminate handler.Mike Stump2009-12-101-0/+3
| | | | llvm-svn: 90998
* Add terminate handler to cleanups on exceptional edges.Mike Stump2009-12-091-3/+2
| | | | llvm-svn: 90996
* Code gen for ObjCIsaExpr AST used as lvalue.Fariborz Jahanian2009-12-091-0/+1
| | | | | | (fixes radar 7457534). llvm-svn: 90995
* Break out code for reuse. WIP.Mike Stump2009-12-091-0/+2
| | | | llvm-svn: 90991
* 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
OpenPOWER on IntegriCloud