Commit Graph

210 Commits

Author SHA1 Message Date
Chris Lattner 06ae0e2c3b small cleanups.
llvm-svn: 68095
2009-03-31 08:33:16 +00:00
Fariborz Jahanian dac14a7159 - Minor change to dump of ivar layout map.
- Temporarily undef'ed __OBJC2__ in nonfragile objc abi mode
  as it was forcing ivar synthesis in a certain project which clang
  does not yet support.

llvm-svn: 67766
2009-03-26 19:10:36 +00:00
Fariborz Jahanian f909f92799 More for for objc2's ivar layout map (currently
is not in use).

llvm-svn: 67713
2009-03-25 22:36:49 +00:00
Fariborz Jahanian aedcfa49b9 Must allow for strong cast of floats as well (objc2 gc).
llvm-svn: 67551
2009-03-23 19:10:40 +00:00
Chris Lattner d480892445 pull "runtime globals" into the same framework as other functions/global variables.
No intended functionality change.

llvm-svn: 67478
2009-03-22 21:03:39 +00:00
Fariborz Jahanian 07038f9785 Fix a crash during meta-data generation of objc2's nonfragile abi.
llvm-svn: 67402
2009-03-20 20:48:19 +00:00
Daniel Dunbar 64895a0703 Remove a FIXME.
llvm-svn: 67022
2009-03-15 06:05:20 +00:00
Fariborz Jahanian 1b074a3eb7 Fixed an ir-gen bug related to strong-cast generation of
source being a non-pointer.

llvm-svn: 66854
2009-03-13 00:42:52 +00:00
Fariborz Jahanian 1bf7288529 More objc2's ivar layout bitmap.
bitmap generation for basic ivars seem to
work now. This is work in progress.

llvm-svn: 66836
2009-03-12 22:50:49 +00:00
Fariborz Jahanian 99bee42be2 Code refactoring. No change in functionality.
llvm-svn: 66710
2009-03-11 21:42:00 +00:00
Fariborz Jahanian cbaf73cd26 More of objc2's ivar layout bitmap (Next: specific).
Work in progress.

llvm-svn: 66707
2009-03-11 20:59:05 +00:00
Fariborz Jahanian 3b0f886c3f More Next objc2's gc ivar layout bitmap work.
Work in progress.

llvm-svn: 66615
2009-03-11 00:07:04 +00:00
Fariborz Jahanian 524bb20b4b More objc2's gc meta-data work related to ivar layout bitmap.
Work in progress.

llvm-svn: 66546
2009-03-10 16:22:08 +00:00
Daniel Dunbar ae3338429f NeXT: Set alignment on a number of ObjC metadata variables (matching llvm-gcc).
llvm-svn: 66481
2009-03-09 22:18:41 +00:00
Daniel Dunbar c2d4b62046 NeXT: Move some routines over to CreateMetadataVar.
- No intended functionality change.

llvm-svn: 66473
2009-03-09 21:49:58 +00:00
Daniel Dunbar 463cc8ade5 Tweak CreateMetadataVar, take the exact alignment instead of relying
on LLVM TargetData.

llvm-svn: 66455
2009-03-09 20:50:13 +00:00
Fariborz Jahanian de2f33373b More fix for bitfield ivar meta-data and code gen accessing it.
Now, we can actually execute dejagnu test with bitfield ivars
in non-fragile abi mode.

llvm-svn: 66448
2009-03-09 20:44:22 +00:00
Daniel Dunbar 91b000f771 Fix typo in pref commit.
llvm-svn: 66433
2009-03-09 20:16:39 +00:00
Daniel Dunbar 30c653655d NeXT: Add CreateMetadataVar utility method to encapsulate creation of
Obj-C metadata variables (which generally should be handled the same,
although they aren't currently).
 - No functionality change.

llvm-svn: 66432
2009-03-09 20:09:19 +00:00
Fariborz Jahanian 6772621acf Code refactoring. No functional change.
llvm-svn: 66391
2009-03-08 20:18:37 +00:00
Fariborz Jahanian 03676f557c correct bitfield ivar offset in ivar meta-data.
(objc abi specific).

llvm-svn: 66345
2009-03-07 19:43:20 +00:00
Mike Stump a6ca334389 Fixup our uses of various linkages to match how llvm now works. I think they are all
correct, but an extra set of ObjC eyes would be good.

llvm-svn: 66342
2009-03-07 16:33:28 +00:00
Eli Friedman a374b68b5a Back out the patch in r66302, and re-fix it properly. We assume for
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.

llvm-svn: 66321
2009-03-07 03:57:15 +00:00
Daniel Dunbar 9676015e86 Cleanup EH a bit given changes to ObjCCatchStmt.
- No functionality change.

llvm-svn: 66218
2009-03-06 00:01:21 +00:00
Fariborz Jahanian c559f3f175 More function stop for objc2's ivar layout bit map.
llvm-svn: 66209
2009-03-05 22:39:55 +00:00
Fariborz Jahanian 01dff426c8 Adds a template for a function for objc2's gc's ivar layout
bitmap.

llvm-svn: 66175
2009-03-05 19:17:31 +00:00
Devang Patel 4b6e4bb25d Refactor code.
llvm-svn: 66043
2009-03-04 18:21:39 +00:00
Steve Naroff 371b8fb4c3 Fix <rdar://problem/6640991> Exception handling executes wrong clause (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

llvm-svn: 65964
2009-03-03 19:52:17 +00:00
Daniel Dunbar 76b7acc49f First cut at zero-cost EH support.
- 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.

llvm-svn: 65809
2009-03-02 06:08:11 +00:00
Daniel Dunbar 7a38ce4f88 Make sure to invoke (not call) to objc_exception_throw if necessary.
llvm-svn: 65808
2009-03-02 05:20:36 +00:00
Daniel Dunbar a646834214 Fix completely broken thinko in GetClassGlobal.
llvm-svn: 65807
2009-03-02 05:18:14 +00:00
Daniel Dunbar 88367f2768 Obj-C non fragile ABI: Use GetClassGlobal in one more instance I missed.
llvm-svn: 65762
2009-03-01 04:51:18 +00:00
Daniel Dunbar b1559a4499 Obj-C non fragile ABI: Add GetInterfaceEHType for getting the Obj-C
exception typeinfo metadata, and a few other EH related types/functions.
 - No functionality change.

llvm-svn: 65761
2009-03-01 04:46:24 +00:00
Daniel Dunbar c6928bbe29 NeXT: Unify code for creating a class global.
- No functionality change.

llvm-svn: 65760
2009-03-01 04:40:10 +00:00
Daniel Dunbar 947bca2cc9 ObjCAtCatchStmt's ParamStmt is always a DeclStmt.
llvm-svn: 65759
2009-03-01 04:28:32 +00:00
Fariborz Jahanian bac73acc24 Obscure code gen bug related to sending
message to 'super' in a class method declared in
cateogy (darwin specific).

llvm-svn: 65709
2009-02-28 20:07:56 +00:00
Fariborz Jahanian cd073cc2e9 Alignment of pointers in __objc_classlist must be on their
natural alignment. Otherwise, the excess hole confuses the
objc2 runtime (this is darwin specific).

llvm-svn: 65666
2009-02-28 00:54:00 +00:00
Fariborz Jahanian ec3385733a Couple of meta-data segments were wrong. This patch fixes them.
llvm-svn: 65578
2009-02-26 22:30:39 +00:00
Fariborz Jahanian 03b300b734 Fix an inconsistance in objc2's meta-data related to
the symbol for the root meta-data.

llvm-svn: 65548
2009-02-26 18:23:47 +00:00
Fariborz Jahanian 240f2b7851 patch for two things.
make sure objc2's nonfragile abi is enacted for Leopard too.
add -fobjc-gc-only flag to the image_info symbol.

llvm-svn: 65413
2009-02-24 23:34:44 +00:00
Fariborz Jahanian 6fe4306195 Set flag for -fobjc-gc in IMAGE_INFO variable.
llvm-svn: 65387
2009-02-24 21:08:09 +00:00
Daniel Dunbar 0b0dcd987d Some initial Obj-C zero cost EH support.
- 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.

llvm-svn: 65378
2009-02-24 07:47:38 +00:00
Daniel Dunbar 94ceb61574 Fix two @synchronized bugs found by inspection: the expression to sychronize 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.

llvm-svn: 65362
2009-02-24 01:43:46 +00:00
Fariborz Jahanian 0f466c746f More objc's gc ir-gen stuff.
llvm-svn: 65077
2009-02-19 23:36:06 +00:00
Anders Carlsson 9ab53d120e Add support for throwing exceptions to the nonfragile ABI
llvm-svn: 64692
2009-02-16 22:59:18 +00:00
Fariborz Jahanian 06292955d0 Added implementation of objc2's gc API calls for
nonfragile abi.

llvm-svn: 64690
2009-02-16 22:52:32 +00:00
Daniel Dunbar d73ea816af assert/ErrorUnsupported in unimplemented stub functions instead of
miscompiling.

llvm-svn: 64647
2009-02-16 18:48:45 +00:00
Daniel Dunbar 8de90f0a92 Obj-C non-fragile ABI: Fix types of a few globals; these were not
creating valid LLVM structures (although they work fined).

llvm-svn: 64580
2009-02-15 07:36:20 +00:00
Fariborz Jahanian 35afdfc36e Fixed a bad ir-gen bug which caused a dejagnu test to fail.
Now we are pretty close to be in sync with objc's classic 
abi when it comes to passing dejagnu objc executable tests.

llvm-svn: 64569
2009-02-14 21:25:36 +00:00
Fariborz Jahanian 99bed6fd21 Fixed a problem caused by foreward @class use
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).

llvm-svn: 64563
2009-02-14 20:13:28 +00:00