summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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
OpenPOWER on IntegriCloud