summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.Eli Friedman2009-04-261-2/+2
| | | | llvm-svn: 70145
* split ObjC and C++ Statements out into their own headers.Chris Lattner2009-04-261-0/+1
| | | | llvm-svn: 70105
* Minor refactoring. No intended change in behavior.Fariborz Jahanian2009-04-241-3/+3
| | | | llvm-svn: 69988
* Minor refactoring. No change in functionality.Fariborz Jahanian2009-04-241-2/+1
| | | | llvm-svn: 69979
* Some code clean up of objc2's bitmap layout.Fariborz Jahanian2009-04-241-30/+28
| | | | llvm-svn: 69970
* Removed bunch of FIXMEs no longer needed.Fariborz Jahanian2009-04-231-8/+0
| | | | llvm-svn: 69896
* Mark IMAGE_INFO as constant on x86_64-darwin.Daniel Dunbar2009-04-231-0/+1
| | | | | | | - This shouldn't change anything, we never actually access it, but this is consistent with llvm-gcc (and 32-bit) llvm-svn: 69880
* Use std::sort instead of qsort.Daniel Dunbar2009-04-231-15/+7
| | | | | | | | | - Notably, there was a memory error here, SkipIvars does not have to be the same size as IvarsInfo. - Fariborz, please check. llvm-svn: 69850
* Eliminate the three SmallVectors in ObjCImplDecl (for instanceDouglas Gregor2009-04-231-20/+30
| | | | | | | | | | | methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). llvm-svn: 69849
* ivar layout bitmap is alive!Fariborz Jahanian2009-04-221-10/+20
| | | | llvm-svn: 69838
* Reapply r69771, with updates & fixes:Daniel Dunbar2009-04-221-8/+21
| | | | | | | | | | | | | | | | | | | | | | Rework the shadow struct that is layed out for Objective-C classes. - Superclasses are now always laid out in their shadow structure at the first field. - Prior to this, the entire class heirarchy was flattened into a single structure which meant that alignment, padding, and bitfields were incorrect (the ASTRecordLayout was correct however, which meant our debug info didn't coincide with ivar offsets, for example). - This is still very suboptimal (for example, ivar are looked up recursively, but I believe the ivar layout itself is now at least close to correct. - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding backwards llvm-svn: 69811
OpenPOWER on IntegriCloud