Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix a nasty bug where temporaries weren't marked as being conditional in ↵ | Anders Carlsson | 2010-01-24 | 1 | -0/+3 |
| | | | | | | some cases. llvm-svn: 94341 | ||||
* | Roll out ASTContext::getTypeSizeInChars(), replacing instances of | Ken Dyck | 2010-01-11 | 1 | -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 the | Chris Lattner | 2010-01-09 | 1 | -1/+5 |
| | | | | | | lvalue to poke, no functionality change. llvm-svn: 93075 | ||||
* | Fix for PR5967: Make const-marking for LLVM globals correct for cases requiring | Eli Friedman | 2010-01-08 | 1 | -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 Friedman | 2010-01-03 | 1 | -4/+0 |
| | | | | llvm-svn: 92439 | ||||
* | Move address points to CGVtableInfo, no functionality change. | Anders Carlsson | 2010-01-02 | 1 | -1/+1 |
| | | | | llvm-svn: 92420 | ||||
* | Correctly pass VTT parameters to constructors and destructors. The VTTs ↵ | Anders Carlsson | 2010-01-02 | 1 | -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 Carlsson | 2009-12-24 | 1 | -4/+8 |
| | | | | llvm-svn: 92145 | ||||
* | Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us ↵ | Anders Carlsson | 2009-12-24 | 1 | -1/+3 |
| | | | | | | halfway towards fixing PR5824. llvm-svn: 92142 | ||||
* | Pass ReturnValueSlot to EmitCall. No functionality change yet. | Anders Carlsson | 2009-12-24 | 1 | -0/+1 |
| | | | | llvm-svn: 92138 | ||||
* | Add a ReturnValueSlot class. Change the argument order in EmitCall to match ↵ | Anders Carlsson | 2009-12-24 | 1 | -1/+1 |
| | | | | | | the other overload better. llvm-svn: 92136 | ||||
* | Work in progress for setting the vtable pointers for all bases correctly in | Eli Friedman | 2009-12-18 | 1 | -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 Stump | 2009-12-16 | 1 | -0/+8 |
| | | | | llvm-svn: 91498 | ||||
* | Switch codegen for -fcatch-undefined-bahavior over to __builtin_trap | Mike Stump | 2009-12-15 | 1 | -4/+4 |
| | | | | | | instead of abort to improve codesize and codegen. llvm-svn: 91374 | ||||
* | Add support for detecting undefined shift behavior. WIP. | Mike Stump | 2009-12-14 | 1 | -5/+5 |
| | | | | llvm-svn: 91341 | ||||
* | Implement runtime checks for undefined behavior. WIP. | Mike Stump | 2009-12-12 | 1 | -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 Friedman | 2009-12-10 | 1 | -1/+2 |
| | | | | llvm-svn: 91041 | ||||
* | Ensure we only generate one terminate handler. | Mike Stump | 2009-12-10 | 1 | -0/+3 |
| | | | | llvm-svn: 90998 | ||||
* | Add terminate handler to cleanups on exceptional edges. | Mike Stump | 2009-12-09 | 1 | -3/+2 |
| | | | | llvm-svn: 90996 | ||||
* | Code gen for ObjCIsaExpr AST used as lvalue. | Fariborz Jahanian | 2009-12-09 | 1 | -0/+1 |
| | | | | | | (fixes radar 7457534). llvm-svn: 90995 | ||||
* | Break out code for reuse. WIP. | Mike Stump | 2009-12-09 | 1 | -0/+2 |
| | | | | llvm-svn: 90991 | ||||
* | Add cleanups for exceptional edges. WIP. | Mike Stump | 2009-12-09 | 1 | -7/+48 |
| | | | | llvm-svn: 90940 | ||||
* | Fix for PR5707: make sure implicit copy constructors initialize the vtable | Eli Friedman | 2009-12-08 | 1 | -0/+2 |
| | | | | | | pointer. llvm-svn: 90840 | ||||
* | Add codegen support for exception specifications. WIP. | Mike Stump | 2009-12-07 | 1 | -0/+6 |
| | | | | llvm-svn: 90817 | ||||
* | implement rdar://7346691 by codegen'ing struct/array initializers | Chris Lattner | 2009-12-05 | 1 | -2/+11 |
| | | | | | | to a memset or a memcpy from a global when possible. llvm-svn: 90658 | ||||
* | Add support for function try blocks. | Mike Stump | 2009-12-04 | 1 | -0/+6 |
| | | | | llvm-svn: 90622 | ||||
* | Make functions returning a struct indirectly evaluate the returned struct | Eli Friedman | 2009-12-04 | 1 | -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 Friedman | 2009-12-03 | 1 | -2/+2 |
| | | | | llvm-svn: 90411 | ||||
* | Add support for thunking dtors. Oh why does this make my head hurt? | Mike Stump | 2009-12-03 | 1 | -2/+2 |
| | | | | llvm-svn: 90409 | ||||
* | More exception handling improvements... WIP. | Mike Stump | 2009-12-02 | 1 | -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 Stump | 2009-11-30 | 1 | -29/+27 |
| | | | | llvm-svn: 90152 | ||||
* | Add a CovariantThunkAdjustment struct that represents the adjustments needed ↵ | Anders Carlsson | 2009-11-26 | 1 | -5/+6 |
| | | | | | | for a covariant thunk. llvm-svn: 89933 | ||||
* | Add a ThunkAdjustment struct which holds a non-virtual and a virtual ↵ | Anders Carlsson | 2009-11-26 | 1 | -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 Carlsson | 2009-11-25 | 1 | -2/+7 |
| | | | | | | yet). llvm-svn: 89835 | ||||
* | Eliminate CXXConditionDeclExpr with extreme prejudice. | Douglas Gregor | 2009-11-25 | 1 | -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 with | Douglas Gregor | 2009-11-24 | 1 | -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 Carlsson | 2009-11-24 | 1 | -2/+7 |
| | | | | | | constructor has default arguments. llvm-svn: 89783 | ||||
* | Introduce cleanup scopes for "if" statements in two places: | Douglas Gregor | 2009-11-24 | 1 | -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 Gregor | 2009-11-24 | 1 | -4/+4 |
| | | | | llvm-svn: 89769 | ||||
* | Handle base-to-derived casts. Will land test case shortly. | Anders Carlsson | 2009-11-23 | 1 | -4/+9 |
| | | | | llvm-svn: 89678 | ||||
* | Fix lifetime of conditional temporaries. Patch by Victor Zverovich! | Anders Carlsson | 2009-11-20 | 1 | -12/+16 |
| | | | | llvm-svn: 89467 | ||||
* | Add an assertion to catch bad calls to EmitCallArgs. | Eli Friedman | 2009-11-18 | 1 | -0/+1 |
| | | | | llvm-svn: 89190 | ||||
* | Missing piece of r89173. | Eli Friedman | 2009-11-18 | 1 | -0/+3 |
| | | | | llvm-svn: 89174 | ||||
* | More const is always good. | Anders Carlsson | 2009-11-17 | 1 | -2/+2 |
| | | | | llvm-svn: 89033 | ||||
* | Implement most of dynamic_cast. WIP. | Mike Stump | 2009-11-16 | 1 | -0/+1 |
| | | | | llvm-svn: 88901 | ||||
* | Implement typeid for class types. | Mike Stump | 2009-11-15 | 1 | -1/+4 |
| | | | | llvm-svn: 88843 | ||||
* | Code gen for arrady delete operator. Fixes pr5472. | Fariborz Jahanian | 2009-11-13 | 1 | -0/+4 |
| | | | | llvm-svn: 88680 | ||||
* | Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated. | Daniel Dunbar | 2009-11-13 | 1 | -1/+1 |
| | | | | llvm-svn: 87087 | ||||
* | Add a special BuildVirtualCall that's going to be used for building calls to ↵ | Anders Carlsson | 2009-11-13 | 1 | -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 of | Fariborz Jahanian | 2009-11-10 | 1 | -1/+5 |
| | | | | | | global array of objects. llvm-svn: 86701 |