summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update for LLVM API change.Owen Anderson2009-07-131-43/+46
| | | | llvm-svn: 75446
* Generate correct prototype for objc_enumerationMutation.Daniel Dunbar2009-07-111-4/+7
| | | | | | - This was a latent bug exposed by the recent objc type changes. llvm-svn: 75383
* Fix typo (found by gcc warning).Eli Friedman2009-07-111-1/+1
| | | | llvm-svn: 75325
* This patch includes a conceptually simple, but very intrusive/pervasive change. Steve Naroff2009-07-101-10/+9
| | | | | | | | | | | | The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. llvm-svn: 75314
* Update for LLVM API change.Owen Anderson2009-07-081-110/+63
| | | | llvm-svn: 75028
* Update for LLVM API change.Owen Anderson2009-07-081-25/+52
| | | | llvm-svn: 74986
* Implemented memmove_collectable API for Next runtimeFariborz Jahanian2009-07-081-0/+41
| | | | | | | when struct variables with GC'able members are copied into. Will provide a test case later. llvm-svn: 74984
* use new and simplified LLVM APIs. Patch by Jay Foad!Chris Lattner2009-07-011-3/+1
| | | | llvm-svn: 74585
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-301-39/+22
| | | | | | | Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
* 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
* Simplify, and fix a possible crash (never happens however, because we don't everDaniel Dunbar2009-06-261-10/+7
| | | | | | take this path with non-builtin floating point types). llvm-svn: 74303
* Patch fixes an obscure bug when 'used' attribute is applied toFariborz Jahanian2009-06-231-34/+12
| | | | | | | | | variables in ObjC's Next runtime mode. Next runtime also implicitly applies 'used' attribute on some of its meta-data. This results in two 'llvm.used' arrays to be generated, and one of them is renamed to 'llvm.used1'. llvm-svn: 74008
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-181-5/+6
| | | | llvm-svn: 73702
* Support complex properties, ivars and message expressions.Daniel Dunbar2009-06-101-0/+2
| | | | llvm-svn: 73158
* Cleanup/Refactoring of ivar collection. No change in functionality.Fariborz Jahanian2009-06-041-37/+9
| | | | llvm-svn: 72827
* Minor refactoring. Uses an existing API to lookup a class method.Fariborz Jahanian2009-05-211-11/+3
| | | | llvm-svn: 72203
* Reflow some comments.Mike Stump2009-05-161-38/+34
| | | | llvm-svn: 71937
* Classes with "+load" methods need to go in the non-lazy class list (orDaniel Dunbar2009-05-151-10/+40
| | | | | | else the method will not be found by the runtime at class load time). llvm-svn: 71904
* Factor code for adding module-level class lists into separate method.Daniel Dunbar2009-05-151-43/+43
| | | | | | - No functionality change. llvm-svn: 71898
* Removed 4-letter :) word in comment.Fariborz Jahanian2009-05-131-8/+8
| | | | | | Used simple array for Selector build. llvm-svn: 71674
* Fixed typos, used DenseSet for keeping track ofFariborz Jahanian2009-05-121-34/+48
| | | | | | | selectors which need use Nonfrgile API for message dispatch. llvm-svn: 71578
* Patch to implement ivar synthesis of properties declared in protocolsFariborz Jahanian2009-05-121-19/+19
| | | | | | only and used in class imllementations (objc2 Nonfragile ABI specific). llvm-svn: 71571
* Patch to allow Nonfragile ABI to use 32-bit style legacyFariborz Jahanian2009-05-111-105/+220
| | | | | | | | message dispage API for all but a few messages. This is a runtime performance improvement and there is not meant to be a functional change. llvm-svn: 71467
* Correct for renaming PaddedSize -> AllocSize inDuncan Sands2009-05-091-20/+20
| | | | | | LLVM. llvm-svn: 71350
* Patch to support Gnu runtime's typed selectors.Fariborz Jahanian2009-05-051-5/+24
| | | | | | Patch by David Chisnall. llvm-svn: 71023
* Remove an unneeded lookup routine.Daniel Dunbar2009-05-051-35/+7
| | | | llvm-svn: 70951
* Fix the field count in interface record layout (it was incorrectlyDaniel Dunbar2009-05-041-6/+7
| | | | | | | | | | | | compensating for super classes). This was making the reported class sizes for empty classes very, very wrong. - Also, we now report the size info for an empty class like gcc (as the offset of the start, not as 0, 0). - Add a few more test cases we were mishandling before (padding bit field at end of struct, for example). llvm-svn: 70938
* Compute interface instanceStart and instanceSize using the recordDaniel Dunbar2009-05-041-25/+6
| | | | | | | | | layout. - This is much simpler / more efficient. - This also properly computes the size in the presence of bit-fields. llvm-svn: 70916
* Don't allow clients to traverse into superclass synthesized propertiesDaniel Dunbar2009-05-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via CollectObjCIvars. - In places where we need them, we should have the implementation and access the properties through it. This is a fairly substantial functionality change: 1. @encode no longer encodes synthesized ivars, ever. 2. The ivar layout bitmap no longer encodes information for synthesized ivars in superclasses. Well, actually I had already broken that, but it is intentional now. We are now differing substantially from llvm-gcc and gcc here. However, in my opinion this fundamentally *must* work if non-fragile classes are to work. Without this change, the result of @encode and the ivar layout depend on the order that the implementation is seen in a file (if it is in the same file with its superclass). Since both scenarios should work the same, our behavior is now consistent with gcc behavior as if an implementation is never seen following an implementation of its superclass. Note that #2 is only a functionality change when (A) an implementation appears in the same translation unit with the implementation of its superclass, and (B) the superclass has synthesized ivars. My belief is that this situation does not occur in practice. I am not yet sure of the role/semantics of @encode when synthesized ivars are present... it's use is fairly unsound in a non-fragile world. llvm-svn: 70822
* Inline GetFieldBaseOffset into sole callsite.Daniel Dunbar2009-05-031-16/+6
| | | | llvm-svn: 70813
* Avoid recomputing field offsets.Daniel Dunbar2009-05-031-8/+10
| | | | llvm-svn: 70812
* Normalize formattingDaniel Dunbar2009-05-031-28/+13
| | | | llvm-svn: 70810
* Use the implementation decl for looking up offset while building theDaniel Dunbar2009-05-031-5/+5
| | | | | | | ivar layout. - The layout needs access to synthesized ivars. llvm-svn: 70798
* It turns out BuildAggrIvarLayout wasn't even using the shadow struct,Daniel Dunbar2009-05-031-11/+1
| | | | | | just computing it! llvm-svn: 70779
* Lift common subexpression, remove dead "base" variable.Daniel Dunbar2009-05-031-11/+8
| | | | llvm-svn: 70778
* Factor out BuildAggrIvarRecordLayout routine.Daniel Dunbar2009-05-031-34/+33
| | | | llvm-svn: 70777
* Lift out GetGCAttrTypeForType routine.Daniel Dunbar2009-05-031-20/+23
| | | | llvm-svn: 70776
* Add constructors for GC_IVAR and SKIP_SCAN, tighten up uses.Daniel Dunbar2009-05-031-47/+35
| | | | | | Lift up a size calculation and note some asymmetries. llvm-svn: 70775
* Normalize style, remove a dead assert.Daniel Dunbar2009-05-031-32/+16
| | | | llvm-svn: 70771
* Use ASTRecordLayout for computing ivar offsets instead of shadowDaniel Dunbar2009-05-031-41/+43
| | | | | | | | | | | struct. - We still need to do more lookup than necessary because ivars don't live in a reasonable DeclContext. - The only remaining client of the interface shadow struct is the ivar layout bitmap. llvm-svn: 70756
* Add a ComputeIvarBaseOffset overload taking an implementationDaniel Dunbar2009-05-031-10/+20
| | | | | | | | decl. Only this routine will be suitable for computing the offset of a synthesized ivar. - No functionality change. llvm-svn: 70696
* Compute Objective-C metadata size information from the record layout,Daniel Dunbar2009-05-031-8/+8
| | | | | | not the shadow structure. llvm-svn: 70691
* Remove unused argument.Daniel Dunbar2009-05-031-3/+1
| | | | llvm-svn: 70684
* Coalesce the ivar offset calculation further.Daniel Dunbar2009-05-031-36/+28
| | | | llvm-svn: 70683
* Use type from ivar instead of from shadow struct field.Daniel Dunbar2009-05-031-3/+3
| | | | | | - No functionality change. llvm-svn: 70674
* Remove a warning when this file is compiled optimized.Fariborz Jahanian2009-04-301-1/+2
| | | | llvm-svn: 70518
* API for message dispatch of methods returning floatsFariborz Jahanian2009-04-301-5/+12
| | | | | | to match gcc's closely. llvm-svn: 70493
* Undid setting of the flag for msg_Send for 32bit code gen.Fariborz Jahanian2009-04-291-3/+2
| | | | | | It seems to effect code gen. Add a FIXME instead. llvm-svn: 70423
* Export lazy references of .objc_class_name of class namesFariborz Jahanian2009-04-291-0/+1
| | | | | | | referenced in a category implementation meta-data (Next objc 32bit abi). llvm-svn: 70407
* Type of msgSend message dispatch API is a vararg.Fariborz Jahanian2009-04-291-1/+3
| | | | llvm-svn: 70404
OpenPOWER on IntegriCloud