summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add cleanups for exceptional edges. WIP.Mike Stump2009-12-091-1/+5
| | | | llvm-svn: 90940
* Use StringRef in CGDebugInfo::EmitFunctionStart.Benjamin Kramer2009-12-081-4/+1
| | | | llvm-svn: 90856
* Add codegen support for exception specifications. WIP.Mike Stump2009-12-071-0/+2
| | | | llvm-svn: 90817
* Add support for function try blocks.Mike Stump2009-12-041-1/+10
| | | | llvm-svn: 90622
* Make functions returning a struct indirectly evaluate the returned structEli Friedman2009-12-041-3/+13
| | | | | | | 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
* More exception handling improvements... WIP.Mike Stump2009-12-021-9/+22
| | | | | | | | | | | 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
* Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used ↵Anders Carlsson2009-11-251-1/+33
| | | | | | yet). llvm-svn: 89835
* Fix lifetime of conditional temporaries. Patch by Victor Zverovich!Anders Carlsson2009-11-201-1/+2
| | | | llvm-svn: 89467
* indirectbr seems to work! Rip out the old code.Chris Lattner2009-11-061-99/+0
| | | | llvm-svn: 86256
* If a member variable of reference type is bound to a temporary in its member ↵Anders Carlsson2009-11-061-0/+5
| | | | | | initializer it needs to be destroyed at the end of the constructor. llvm-svn: 86230
* Cleanup ctor/dtor emission.Anders Carlsson2009-11-061-11/+12
| | | | llvm-svn: 86222
* This patch extends CleanupScope to support destructionFariborz Jahanian2009-11-041-7/+9
| | | | | | of array objects on block exit. Patch is by Anders Calrsson. llvm-svn: 86032
* Implement clang support for indirect branch and address of labelChris Lattner2009-10-281-0/+68
| | | | | | | | 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
* factor a creation of Int32Ty.Chris Lattner2009-10-281-4/+3
| | | | llvm-svn: 85422
* Fixup the return type of functions.Mike Stump2009-10-231-2/+4
| | | | llvm-svn: 84922
* reimplement codegen for indirect goto with the following advantages:Chris Lattner2009-10-131-31/+72
| | | | | | | | | | | | | 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
* number address-taken labels from 1. This allows 0 to be used as a sentinelChris Lattner2009-10-131-1/+1
| | | | | | | for a null pointer. In other words, "&&foo != NULL" will always work out to true. llvm-svn: 83948
* Use the new Type::getInt8PtrTy method. This should probably be used in a lotChris Lattner2009-10-131-1/+1
| | | | | | more places in clang codegen now. llvm-svn: 83947
* Emit the destructor epilogue in a cleanup block so a return from a ↵Anders Carlsson2009-10-061-1/+20
| | | | | | destructor body still calls the epilogue. llvm-svn: 83397
* CodeGen may see out-of-line declarations of the various special memberDouglas Gregor2009-10-011-14/+23
| | | | | | | | | | | functions when they are explicitly declared, e.g., via a function template specialization or explicit template instantiation declaration. Don't try to synthesize bodies for the special member functions in this case; rather, check whether we have an implicit declaration and, if so, synthesize the appropriate function body. Fixes PR5084. llvm-svn: 83212
* Improve support for member function pointers.Anders Carlsson2009-09-291-1/+2
| | | | llvm-svn: 83039
* Make hasAggregateLLVMType use positive checks.Anders Carlsson2009-09-291-5/+1
| | | | llvm-svn: 83037
* Fix 80-col violation.Mike Stump2009-09-251-1/+2
| | | | llvm-svn: 82782
* Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall2009-09-211-1/+1
| | | | | | | | | | | Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
* Remove an unnecessary FunctionDecl parameter to the synthesizing functions.Anders Carlsson2009-09-141-7/+7
| | | | llvm-svn: 81759
* Pass the GlobalDecl to getMangledName, fixes PR4890.Anders Carlsson2009-09-111-2/+2
| | | | llvm-svn: 81486
* Pass GlobalDecls to GenerateCode and StartFunction.Anders Carlsson2009-09-111-10/+15
| | | | llvm-svn: 81485
* If a cast expression needs either a conversion function or a constructor to ↵Anders Carlsson2009-09-091-11/+0
| | | | | | be called, generate implicit child expressions that call them. llvm-svn: 81383
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-114/+108
| | | | llvm-svn: 81346
* Patch to ir-gen user-defined conversions used in expressionsFariborz Jahanian2009-08-291-0/+11
| | | | | | [12.3.2-p3] llvm-svn: 80436
* Regularize the case and sort.Mike Stump2009-08-261-1/+1
| | | | llvm-svn: 80163
* Remove dead codeAnders Carlsson2009-08-241-9/+0
| | | | llvm-svn: 79921
* Patch to 1) synthesizing non-trivial default destructor whenFariborz Jahanian2009-08-171-0/+2
| | | | | | | | one is not provided by user. 2) More complete emission of ctor prologue when it has no initializer list or when it is synthesized. llvm-svn: 79269
* Fix for PR4721: adjust CodeGen and ASTContext so that we have a Eli Friedman2009-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | consistent model for handling size expressions for VLAs. The model is essentially as follows: VLA types own their associated expression. In some cases, we need to create multiple VLA types to represent a given VLA (for canonical types, or qualifiers on array types, or type merging). If we need to create multiple types based off of the same VLA declaration, we use the new refcounting functionality so they can all own the expression. The VLASizeMap in CodeGenFunction then uses the size expression to identify the group of VLA types based off of the same original declaration. I'm not particularly attached to the VLA types owning the expression, but we're stuck with at least until someone comes up with a way to walk the VLA expressions for a declaration. I did the parallel fix in ASTContext for DependentSizedArrayType, but I haven't really looked closely at it, so there might still be issues there. I'll clean up the code duplication in ASTContext in a followup commit. llvm-svn: 79071
* minor cleanups for VLA stuff.Chris Lattner2009-08-151-13/+12
| | | | llvm-svn: 79059
* Update for LLVM API change.Owen Anderson2009-08-131-12/+13
| | | | llvm-svn: 78946
* Patch for synthesizing copy assignment operator.Fariborz Jahanian2009-08-121-0/+3
| | | | | | WIP. llvm-svn: 78841
* minor refactoring. No change otherwise.Fariborz Jahanian2009-08-101-3/+1
| | | | llvm-svn: 78582
* Improve handling of member pointers.Anders Carlsson2009-08-091-2/+2
| | | | llvm-svn: 78536
* Add support for global initializers.Anders Carlsson2009-08-081-1/+1
| | | | llvm-svn: 78515
* Refactoring of copy ctor ir-gen. No change in functionality.Fariborz Jahanian2009-08-081-3/+1
| | | | llvm-svn: 78489
* Synthesized copy constructor now generates code forFariborz Jahanian2009-08-071-1/+1
| | | | | | | copying non-virtual base classes which have non-trivial constructor. Work in progress. llvm-svn: 78436
* More synthesis of copy constructors. Work in progress.Fariborz Jahanian2009-08-071-0/+1
| | | | llvm-svn: 78402
* Patch toward synthesizing copy constructors.Fariborz Jahanian2009-08-061-7/+16
| | | | | | Work in progress. llvm-svn: 78355
* Update for LLVM API change.Owen Anderson2009-07-311-2/+2
| | | | llvm-svn: 77722
* Synthesize the default constructor which has notFariborz Jahanian2009-07-301-1/+11
| | | | | | been declared as needed. llvm-svn: 77641
* Update for LLVM API changes.Owen Anderson2009-07-301-1/+1
| | | | llvm-svn: 77638
* Patch for future ir-gen for destructor calls.Fariborz Jahanian2009-07-301-0/+2
| | | | llvm-svn: 77608
* Update for LLVM API change.Owen Anderson2009-07-291-2/+2
| | | | llvm-svn: 77514
* Change uses of:Ted Kremenek2009-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. llvm-svn: 77510
OpenPOWER on IntegriCloud