summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Update for LLVM API change.Owen Anderson2009-07-241-7/+7
| | | | llvm-svn: 77012
* Shield clang from LLVM API changes, until the dust settles.Daniel Dunbar2009-07-231-1/+3
| | | | llvm-svn: 76862
* Move EmitCtorPrologue to CGCXX. Add an assert and FIXMEs.Fariborz Jahanian2009-07-201-33/+0
| | | | llvm-svn: 76498
* Early ir-gen for constructor prologue. This is on going.Fariborz Jahanian2009-07-201-0/+35
| | | | llvm-svn: 76493
* Remove an apparently unused header.Mike Stump2009-07-201-1/+0
| | | | llvm-svn: 76473
* Catch another trivial case where we can avoid emitting a separate return blcok.Daniel Dunbar2009-07-191-4/+5
| | | | llvm-svn: 76365
* Avoid generation of dead code in a few more situations.Daniel Dunbar2009-07-191-4/+4
| | | | | | | | | | | | | - Emit variable declarations as "simple", we want to avoid forcing the creation of a dummy basic block, but still need to make the variable available for later use. - With that, we can now skip IRgen for other unreachable statements (which don't define a label). - Anders, I added two fixmes on calls to EmitVLASize, can you check them? llvm-svn: 76361
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-2/+2
| | | | | | | | | until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. llvm-svn: 76193
* Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek2009-07-171-1/+1
| | | | | | Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. llvm-svn: 76139
* Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.Ted Kremenek2009-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
* Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson2009-07-141-10/+10
| | | | llvm-svn: 75705
* Update for LLVM API change.Owen Anderson2009-07-131-2/+2
| | | | llvm-svn: 75446
* Update for IRBuilder API change.Owen Anderson2009-07-081-0/+1
| | | | llvm-svn: 75041
* Remove the ASTContext parameter from the getBody() methods of Decl and ↵Argyrios Kyrtzidis2009-06-301-1/+1
| | | | | | | | subclasses. Timings showed no significant difference before and after the commit. llvm-svn: 74504
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-301-1/+1
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-181-1/+1
| | | | llvm-svn: 73702
* When possible, don't emit the cleanup block. Instead, just move the ↵Anders Carlsson2009-05-311-1/+7
| | | | | | instructions to the current block. llvm-svn: 72654
* Re-add a slightly more general version of the check from r72578; it is Eli Friedman2009-05-291-0/+2
| | | | | | actually necessary in some obscure cases. llvm-svn: 72585
OpenPOWER on IntegriCloud