aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
AgeCommit message (Collapse)Author
2009-03-15Remove a FIXME.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13Fixed an ir-gen bug related to strong-cast generation ofFariborz Jahanian
source being a non-pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66854 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12More objc2's ivar layout bitmap.Fariborz Jahanian
bitmap generation for basic ivars seem to work now. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11Code refactoring. No change in functionality.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66710 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11More of objc2's ivar layout bitmap (Next: specific).Fariborz Jahanian
Work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11More Next objc2's gc ivar layout bitmap work.Fariborz Jahanian
Work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66615 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10More objc2's gc meta-data work related to ivar layout bitmap.Fariborz Jahanian
Work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66546 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09NeXT: Set alignment on a number of ObjC metadata variables (matching llvm-gcc).Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09NeXT: Move some routines over to CreateMetadataVar.Daniel Dunbar
- No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66473 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09Tweak CreateMetadataVar, take the exact alignment instead of relyingDaniel Dunbar
on LLVM TargetData. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66455 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09More fix for bitfield ivar meta-data and code gen accessing it.Fariborz Jahanian
Now, we can actually execute dejagnu test with bitfield ivars in non-fragile abi mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09Fix typo in pref commit.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66433 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09NeXT: Add CreateMetadataVar utility method to encapsulate creation ofDaniel Dunbar
Obj-C metadata variables (which generally should be handled the same, although they aren't currently). - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-08Code refactoring. No functional change.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66391 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-07correct bitfield ivar offset in ivar meta-data.Fariborz Jahanian
(objc abi specific). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66345 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-07Fixup our uses of various linkages to match how llvm now works. I think ↵Mike Stump
they are all correct, but an extra set of ObjC eyes would be good. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66342 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-07Back out the patch in r66302, and re-fix it properly. We assume for Eli Friedman
performance that the type of the returned llvm::Value for an expression matches the converted type of the clang::Expr; mismatches will cause all sorts of errors and silent miscompilations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06Cleanup EH a bit given changes to ObjCCatchStmt.Daniel Dunbar
- No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66218 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05More function stop for objc2's ivar layout bit map.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66209 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05Adds a template for a function for objc2's gc's ivar layoutFariborz Jahanian
bitmap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04Refactor code. Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03Fix <rdar://problem/6640991> Exception handling executes wrong clause ↵Steve Naroff
(Daniel, please verify). Also necessary to fix: <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65964 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02First cut at zero-cost EH support.Daniel Dunbar
- Still manually generates the EH code; the parts related to cleanup need to be integrated into the cleanup stack (for proper interaction with VLAs, etc.). - Some differences vs gcc in corner cases; I believe our behavior is correct but need to verify/file bugs vs gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65809 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02Make sure to invoke (not call) to objc_exception_throw if necessary.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65808 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02Fix completely broken thinko in GetClassGlobal.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01Obj-C non fragile ABI: Use GetClassGlobal in one more instance I missed.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65762 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01Obj-C non fragile ABI: Add GetInterfaceEHType for getting the Obj-CDaniel Dunbar
exception typeinfo metadata, and a few other EH related types/functions. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01NeXT: Unify code for creating a class global.Daniel Dunbar
- No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65760 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01ObjCAtCatchStmt's ParamStmt is always a DeclStmt.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65759 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28Obscure code gen bug related to sending Fariborz Jahanian
message to 'super' in a class method declared in cateogy (darwin specific). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65709 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28Alignment of pointers in __objc_classlist must be on theirFariborz Jahanian
natural alignment. Otherwise, the excess hole confuses the objc2 runtime (this is darwin specific). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65666 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26Couple of meta-data segments were wrong. This patch fixes them.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26Fix an inconsistance in objc2's meta-data related toFariborz Jahanian
the symbol for the root meta-data. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65548 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-24patch for two things.Fariborz Jahanian
make sure objc2's nonfragile abi is enacted for Leopard too. add -fobjc-gc-only flag to the image_info symbol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65413 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-24Set flag for -fobjc-gc in IMAGE_INFO variable.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65387 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-24Some initial Obj-C zero cost EH support.Daniel Dunbar
- Only handles cases with @try with no @catch blocks, and there are a number of problems with the implementation. Nevertheless, this is good enough to handled @synchronized correctly, and some other basic uses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-24Fix two @synchronized bugs found by inspection: the expression to sychronize ↵Daniel Dunbar
on should only be evaluated once, and it is evaluated outside the cleanup scope. Also, lift SyncEnter and SyncExit up in nervous anticipation of x86-64 zero cost EH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19More objc's gc ir-gen stuff.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65077 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-16Add support for throwing exceptions to the nonfragile ABIAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64692 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-16Added implementation of objc2's gc API calls forFariborz Jahanian
nonfragile abi. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-16assert/ErrorUnsupported in unimplemented stub functions instead ofDaniel Dunbar
miscompiling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64647 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-15Obj-C non-fragile ABI: Fix types of a few globals; these were notDaniel Dunbar
creating valid LLVM structures (although they work fined). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64580 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-14Fixed a bad ir-gen bug which caused a dejagnu test to fail.Fariborz Jahanian
Now we are pretty close to be in sync with objc's classic abi when it comes to passing dejagnu objc executable tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64569 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-14Fixed a problem caused by foreward @class useFariborz Jahanian
which consequently caused a Seg fault. during meta-data generation. It also addresses an issue related to late binding of newly synthesize ivars (when we support it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64563 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13Fixed a 64bit code gen bug of a cateogoryFariborz Jahanian
implementation with no category declaration! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-12Fix a bug whereby, an ivar used to synthesize a property belongsFariborz Jahanian
to a base class (nonfragile abi ir gen bug). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64391 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-12Several cleanups:Steve Naroff
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect. - add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time. - move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11ir-gen for objc's @selector expression in nonfragile abi mode.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64323 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10This patch is all it takes to pass all objc2's fast-enumerationFariborz Jahanian
tests in the dejagnu test suite in the nonfragile abi mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10Generate ir for ivar offset. This will passFariborz Jahanian
type-nsobject-attribute.m in the dejagnu test suite in the nonfragile abi mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64233 91177308-0d34-0410-b5e6-96231b3b80d8