summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update for LLVM API change.Owen Anderson2009-07-271-30/+30
| | | | llvm-svn: 77267
* Update for LLVM API change.Owen Anderson2009-07-241-46/+46
| | | | llvm-svn: 77012
* Don't use getLLVMFieldNo for bitfields when constructing the ivar layout ↵Anders Carlsson2009-07-241-4/+8
| | | | | | maps for GC. llvm-svn: 76978
* Fix declaration of obc_enumerationMutation function, for GNU runtime.Daniel Dunbar2009-07-241-2/+1
| | | | llvm-svn: 76959
* Update for LLVM API change.Owen Anderson2009-07-211-4/+4
| | | | llvm-svn: 76599
* Rename NextOffset to DataSize, which better matches the Itanium C++ ABIAnders Carlsson2009-07-181-1/+1
| | | | llvm-svn: 76339
* Revert r75641.Anders Carlsson2009-07-181-1/+1
| | | | llvm-svn: 76327
* fix objc codegen to not have its own list of things that eventually get into ↵Chris Lattner2009-07-171-52/+32
| | | | | | | | llvm.used, just populate CGM's list directly. llvm-svn: 76266
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-3/+3
| | | | | | | | | 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-2/+2
| | | | | | 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
* Remove ASTContext::isObjCObjectPointerType().Steve Naroff2009-07-161-1/+1
| | | | | | Convert all clients to use the new predicate on Type. llvm-svn: 76076
* Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson2009-07-141-267/+290
| | | | llvm-svn: 75705
* Rename RecordLayout.h to ASTRecordLayout.hAnders Carlsson2009-07-141-1/+1
| | | | llvm-svn: 75641
* 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
OpenPOWER on IntegriCloud