Daniel Dunbar
bf90b33665
Reuse ObjcIvarOffsetVariable instead of duplicating code.
...
- No functionality change (but added a FIXME).
llvm-svn: 69496
2009-04-19 00:44:02 +00:00
Daniel Dunbar
a106052090
Remove some unnecessary complexity.
...
- No functionality change.
llvm-svn: 69495
2009-04-19 00:31:15 +00:00
Daniel Dunbar
508a7dda4a
Fix a bug found by inspection, class/meta references could be emitted
...
into the wrong section (they shared the same lookup table).
llvm-svn: 69433
2009-04-18 08:51:00 +00:00
Chris Lattner
6fdd57cba8
fix a crash compiling code with its own definition of objc_assign_weak.
...
rdar://6800430
llvm-svn: 69392
2009-04-17 22:12:36 +00:00
Daniel Dunbar
66b13dac0a
Don't put msgrefs in used globals (in particular, we don't want
...
no-dead-strip set on them).
llvm-svn: 69388
2009-04-17 21:10:58 +00:00
Chris Lattner
10dae30049
Fix rdar://6800926 - crash compiling non-fragile _Bool bitfield ivar,
...
the functional change here is changing ConvertType -> ConvertTypeForMem
so that we handle i1 fields properly as memory.
llvm-svn: 69361
2009-04-17 17:46:19 +00:00
Fariborz Jahanian
68c4c61be8
Removed a no longer needed FIXME comment.
...
llvm-svn: 69315
2009-04-16 21:49:16 +00:00
Fariborz Jahanian
bcf548760e
Category method synbols must be qualified by gategory name to
...
match gcc's.
llvm-svn: 69305
2009-04-16 18:34:20 +00:00
Daniel Dunbar
4b68d26a93
Don't use \01 in symbol name if unnecessary.
...
- This was particularly bad since I fixed one instance of this name
and not another, meaning we got an LLVM module with the same
effective name in two different globals!
llvm-svn: 69205
2009-04-15 19:52:32 +00:00
Daniel Dunbar
24645c9ff4
Fix alignment on obj_msgrefs to match llvm-gcc.
...
llvm-svn: 69199
2009-04-15 19:04:46 +00:00
Daniel Dunbar
e60aa05d34
Add test case for superrefs section (and make spacing consistent).
...
llvm-svn: 69198
2009-04-15 19:03:14 +00:00
Fariborz Jahanian
f5e8ddd550
__objc_superrefs belongs to __DATA segment.
...
llvm-svn: 69170
2009-04-15 16:31:36 +00:00
Daniel Dunbar
b25452a98e
Tweaks to Objective-C metadata (32 & 64-bit) to match llvm-gcc.
...
- Set alignment on property lists.
- 32-bit:
o Set section on property lists.
o Fix section name for category class methods.
o Fix symbol name for property lists.
o Fix section name for class method.
o Set alignment and section on class extension structure.
o Set alignment on a number of things: instance variables, methods,
method descriptions, the symbols structure.
- 64-bit:
o Fix section flags for protocol list.
I doubt most of these were problems in practice, but it is nice to
match llvm-gcc.
llvm-svn: 69132
2009-04-15 02:56:18 +00:00
Daniel Dunbar
3241fae46c
Set alignment on __cstring metadata variables to 1 (matching
...
llvm-gcc).
llvm-svn: 69097
2009-04-14 23:14:47 +00:00
Daniel Dunbar
729df96bf5
Avoid use of magic \01 prefix when unneeded.
...
llvm-svn: 69093
2009-04-14 22:44:26 +00:00
Fariborz Jahanian
899e7eb6c7
Do not dead code strip global meta-data objects.
...
This will match gcc's behavior in the arena.
llvm-svn: 69061
2009-04-14 18:41:56 +00:00
Daniel Dunbar
4527d30c3d
Fix comment.
...
llvm-svn: 69053
2009-04-14 17:42:51 +00:00
Daniel Dunbar
f5f359fb73
Clean up handling of visibility.
...
llvm-svn: 69027
2009-04-14 06:00:08 +00:00
Daniel Dunbar
4184ac847f
Update to use hasAttr() instead of getAttr().
...
- No functionality change.
llvm-svn: 68987
2009-04-13 21:08:27 +00:00
Fariborz Jahanian
464423dce4
Patch to generate meta-data for prtocol used
...
in @protocol expression.
llvm-svn: 68806
2009-04-10 18:47:34 +00:00
Douglas Gregor
bcced4ec31
Propagate the ASTContext to various AST traversal and lookup functions.
...
No functionality change (really).
llvm-svn: 68726
2009-04-09 21:40:53 +00:00
Daniel Dunbar
8f28d01126
Implementation definition of interfaces with __objc_exception attribute.
...
- Complete <rdar://problem/6635883> Support __objc_exception__
attribute
llvm-svn: 68591
2009-04-08 04:21:03 +00:00
Fariborz Jahanian
57eb2e021e
Propagte -fvisibility to objc2's class symbols.
...
llvm-svn: 68543
2009-04-07 20:26:30 +00:00
Daniel Dunbar
d7beeea228
Handle use side of __objc_exception__ attribute; when using an
...
exception with this attribute we don't need to emit a weak definition
for the exception type information.
llvm-svn: 68513
2009-04-07 06:43:45 +00:00
Daniel Dunbar
15894b791b
Various fixes to symbols used for Obj-C x86_64 metadata.
...
- Changed method names to match gcc (categories names still aren't
mangled in).
- Expose correct name for class and metadata symbols (although
-fvisibility=hidden isn't yet correct).
- Remove several things from llvm.used that didn't need to be there
(I suspect this can still be trimmed).
- Don't use asm-prefix extension for _objc_empty_{cache,vtable} (not
needed).
- Hide EH type class info with -fvisibility=hidden
- Change setGlobal[Option]Visibility to not change the visibility of
functions with internal linkage.
llvm-svn: 68510
2009-04-07 05:48:37 +00:00
Fariborz Jahanian
bc3c77b881
Fixed visibility issues related to objc2's synthesized
...
ivars.
llvm-svn: 68453
2009-04-06 18:30:00 +00:00
Chris Lattner
dcceee734c
Fix a couple of cases where Constant* pointers can dangle in
...
ObjCNonFragileABITypesHelper by converting them to dynamic
getters. This fixes a crash on rdar://6757213. The others
should be converted over as well.
llvm-svn: 68445
2009-04-06 16:53:45 +00:00
Fariborz Jahanian
38a5c9650e
Fix up lookup rules for properties declared in
...
objc's continuation class.
llvm-svn: 68339
2009-04-02 18:44:20 +00:00
Fariborz Jahanian
78be1651e2
Nonfragile ivar synthesis with property is in a continuation
...
class.
llvm-svn: 68234
2009-04-01 19:37:34 +00:00
Steve Naroff
e14b368fa9
More "prep" work for handling UTF16 CFString.
...
Patch by Jean-Daniel Dupas. Thanks!
llvm-svn: 68203
2009-04-01 13:55:36 +00:00
Chris Lattner
3088a31e96
remove ASTContext::buildObjCInterfaceType, which breaks canonical
...
types. It is no longer needed now that the code generator
re-lays-out interfaces if they are defines after being laid out
from a forward decl.
llvm-svn: 68194
2009-04-01 06:23:52 +00:00
Fariborz Jahanian
63a224ad59
ir-gen support for nonfragile abi's synthesized ivars.
...
llvm-svn: 68122
2009-03-31 18:11:23 +00:00
Fariborz Jahanian
3254a6f94c
More toward nonfragile abi's synthesized ivars.
...
llvm-svn: 68115
2009-03-31 17:00:52 +00:00
Steve Naroff
66afeb5968
Some "prep" work for handling ObjC @-string constants that contain UTF-8. No functionality change.
...
Changed GenerateConstantString() to take an ObjCStringLiteral (instead of a std::string). While this isn't strictly necessary, it seems cleaner and allows us to cache to "containsNonAscii" if necessary (to avoid checking in both Sema and CodeGen).
llvm-svn: 68114
2009-03-31 16:53:37 +00:00
Chris Lattner
5b36ddb1ad
fill in temporary smallvectors instead of vectors for performance.
...
Fix BuildAggrIvarLayout to not access vectors out of range.
llvm-svn: 68101
2009-03-31 08:48:01 +00:00
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