summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Added block type introspection support.David Chisnall2009-11-171-10/+59
| | | | | | As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple. llvm-svn: 89134
* Remove some misguided code.Mike Stump2009-10-221-8/+2
| | | | llvm-svn: 84823
* Extend out the block descriptor structure for debug information withMike Stump2009-10-221-3/+6
| | | | | | the copy/dispose helpers as appropriate. llvm-svn: 84817
* Turn on the preallocation of all BlockDeclRefExprs.Mike Stump2009-10-211-3/+1
| | | | llvm-svn: 84789
* Refine collection of BlockDeclRefExprs. WIP.Mike Stump2009-10-211-9/+16
| | | | llvm-svn: 84787
* Fix typo.Mike Stump2009-10-211-2/+1
| | | | llvm-svn: 84770
* Refactor.Mike Stump2009-10-211-4/+0
| | | | llvm-svn: 84769
* Prep work to always preallocate BlockDeclRefExprs so that we canMike Stump2009-10-211-43/+75
| | | | | | | generate the debug information for the first parameter to the block invoke functions. WIP. llvm-svn: 84737
* For now, we need to have the llvm type of the block pointer remain asMike Stump2009-10-201-1/+4
| | | | | | it was. Fixes codegen bug introduced yesterday. llvm-svn: 84668
* Refine the type of the first parameter to block invoke functions.Mike Stump2009-10-201-2/+22
| | | | | | | WIP. I have yet to find the magic incantation to get the structure type to be defined. If someone has a pointer, love to hear it. llvm-svn: 84590
* Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer2009-10-131-2/+1
| | | | llvm-svn: 83964
* Implement a FIXME. This improves codegen just a tad.Mike Stump2009-10-011-9/+10
| | | | llvm-svn: 83221
* A couple of refinements for laying out debug information forMike Stump2009-10-011-12/+15
| | | | | | BlockDeclRefDecls. llvm-svn: 83185
* Improve debugging information for BlockDeclRefExpr. WIP. Given thisMike Stump2009-09-301-0/+32
| | | | | | | scheme, we can switch the previous scheme over to using this code path. There's a bit of simplifications yet to do as well. llvm-svn: 83138
* Fix 80-col violation.Mike Stump2009-09-241-1/+2
| | | | llvm-svn: 82725
* Improve debug info generation for __block variables.Mike Stump2009-09-221-2/+9
| | | | llvm-svn: 82508
* Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall2009-09-211-2/+2
| | | | | | | | | | | 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
* Make clang stop relying on ConstantStruct::get's default value for isPackedNick Lewycky2009-09-191-4/+4
| | | | | | which will be going away (ie. it's becoming a required parameter) later today. llvm-svn: 82323
* Add support for __block variables with alignment greater than __alignof(void *).Anders Carlsson2009-09-121-2/+0
| | | | llvm-svn: 81602
* For __block variables, cache the LLVM types as well as which LLVM field ↵Anders Carlsson2009-09-121-7/+10
| | | | | | where the variable is stored. llvm-svn: 81599
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-15/+15
| | | | llvm-svn: 81346
* Reflow comments and some minor whitespace fixups.Mike Stump2009-09-091-1/+1
| | | | llvm-svn: 81337
* Make BuildByRefType take a ValueDecl instead of a QualType and an alignment.Anders Carlsson2009-09-091-4/+2
| | | | llvm-svn: 81315
* Fix build of clang with gcc-4.4: #include <cstdio> was missing.Torok Edwin2009-08-241-0/+2
| | | | llvm-svn: 79916
* Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use ↵Argyrios Kyrtzidis2009-08-211-2/+1
| | | | | | DeclaratorInfo to get this information. llvm-svn: 79584
* Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema ↵Argyrios Kyrtzidis2009-08-191-5/+5
| | | | | | | | | | | | interfaces. DeclaratorDecl contains a DeclaratorInfo* to keep type source info. Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl. EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo. Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet. llvm-svn: 79392
* Update for LLVM API change.Owen Anderson2009-08-131-12/+16
| | | | llvm-svn: 78946
* Update for LLVM API change.Owen Anderson2009-08-051-8/+11
| | | | llvm-svn: 78259
* Update for LLVM API change.Owen Anderson2009-07-311-2/+2
| | | | llvm-svn: 77722
* Fix spacing.Mike Stump2009-07-311-1/+1
| | | | llvm-svn: 77688
* Canonicalize else spacing.Mike Stump2009-07-301-2/+1
| | | | llvm-svn: 77629
* Update for LLVM API change.Owen Anderson2009-07-291-27/+27
| | | | llvm-svn: 77514
* Change uses of:Ted Kremenek2009-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | 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-291-6/+6
| | | | llvm-svn: 77492
* Update for LLVM API change.Owen Anderson2009-07-271-6/+4
| | | | llvm-svn: 77267
* Update for LLVM API change.Owen Anderson2009-07-241-12/+12
| | | | llvm-svn: 77012
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-1/+1
| | | | | | | | | 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
* 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-50/+53
| | | | llvm-svn: 75705
* Update for LLVM API change.Owen Anderson2009-07-131-2/+2
| | | | llvm-svn: 75446
* Update for LLVM API change.Owen Anderson2009-07-081-13/+8
| | | | llvm-svn: 75028
* Update for LLVM API change.Owen Anderson2009-07-081-4/+7
| | | | llvm-svn: 74986
* As an optimization, we maintain a cache of generatedMike Stump2009-06-051-4/+35
| | | | | | | | | | ___Block_byref_id_object_dispose and ___Block_byref_id_object_copy functions so that we can simply reuse instead of creating a new one. Additionally, add an assert to ensure no one yet tries to align a __block variable beyond the alignment of a pointer as the codegen is incomplete. llvm-svn: 72974
* Reflow some comments.Mike Stump2009-05-161-2/+2
| | | | llvm-svn: 71937
* Fix rdar://6880259 - invalid function name in block call ↵Chris Lattner2009-05-131-32/+7
| | | | | | | | (__NSConcreteGlobalBlock2) by using the appropriate CGM interface instead of directly creating a global. llvm-svn: 71617
* Don't assert when we think we need copy/dispose, but don't need them.Mike Stump2009-05-011-1/+2
| | | | | | Radar 6838889 llvm-svn: 70525
* fix a problem producing debug info with global blocks.Chris Lattner2009-04-231-1/+2
| | | | llvm-svn: 69875
* the logic for computing __func__ and friends is really broken:Chris Lattner2009-04-231-2/+2
| | | | | | | | | the type assigned by sema (and is visible with sizeof(__func__) for example) has nothing to do with what codegen ends up producing. We should eventually add a method on PredefinedExpr to handle this. In the meantime, just set up some framework and add some fixme's. llvm-svn: 69872
* Attributes on block functions were not being set.Daniel Dunbar2009-04-171-0/+2
| | | | | | | - <rdar://problem/6800351> clang not producing correct large struct return code for Blocks llvm-svn: 69337
* Fixup codegen for copy/dispose for block literals. Radar 6791245Mike Stump2009-04-151-4/+10
| | | | llvm-svn: 69232
OpenPOWER on IntegriCloud