Chris Lattner
ce8754edac
remove the last of the non-lazy objc runtime functions for the 32-bit ABI,
...
7 left for 64-bit ABI.
llvm-svn: 69766
2009-04-22 02:44:54 +00:00
Chris Lattner
0a696a42fe
number of non-lazy runtime functions from 9 -> 4.
...
llvm-svn: 69765
2009-04-22 02:38:11 +00:00
Chris Lattner
095ac38f1c
make message send functions lazy, we're down from 14 non-lazy functions to 9.
...
llvm-svn: 69764
2009-04-22 02:32:31 +00:00
Chris Lattner
c6406dbf7f
move more EH stuff to being lazily created. An empty .m file now
...
produces just 14 dead "declares" in llvm ir instead of 19.
llvm-svn: 69763
2009-04-22 02:26:14 +00:00
Chris Lattner
a7c00b4c4c
make try/catch objc runtime functions be lazily generated.
...
rdar://6809612
llvm-svn: 69762
2009-04-22 02:15:23 +00:00
Daniel Dunbar
d1148a7f72
Make sure to mark the interface as completed when we see an
...
@implementation that closes a @class delcaration.
- I don't know how to make a test case for this, but this strengthens
the invariants that hold internally. The functionality change here
is the edit to SemaDeclObjC.cpp.
llvm-svn: 69728
2009-04-21 21:41:56 +00:00
Fariborz Jahanian
f5fec02d0c
More objc2's ivar layout bitmap. No change in functionality.
...
llvm-svn: 69695
2009-04-21 18:33:06 +00:00
Daniel Dunbar
9ebf9516af
Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things
...
when we need them -- which is exactly what some code was already
doing!
- No intended functionality change.
llvm-svn: 69648
2009-04-21 01:19:28 +00:00
Daniel Dunbar
e03f005d30
Assert on a few conditions that (I believe) should hold
...
w.r.t. ASTContext::[gs]etFieldDecl, and the Field argument to
EmitObjCValueForIvar).
llvm-svn: 69639
2009-04-21 00:41:40 +00:00
Fariborz Jahanian
80c9ce2c4a
ObjC2's Ivar bitmap layout work. No change in functionality.
...
llvm-svn: 69629
2009-04-20 22:03:45 +00:00
Daniel Dunbar
e3f5cfc0b8
Move countInheritedIvars to within striking distance of
...
GetClassSizeInfo
Reduce nesting in GetInterfaceDeclStructLayout.
Tweak some comments.
No functionality change.
llvm-svn: 69621
2009-04-20 20:18:54 +00:00
Daniel Dunbar
be1f26df5d
Inline GetFirstIvarInRecord into sole caller.
...
- No functionality change.
llvm-svn: 69582
2009-04-20 07:18:49 +00:00
Daniel Dunbar
75e909f5e0
Set a bit in IMAGE_INFO to indicate that we don't contain any
...
@synthesized ivars for superclasses.
- <rdar://problem/6806371> [clang] Mark code without miscompiled
@synthesized properties
llvm-svn: 69581
2009-04-20 07:11:47 +00:00
Daniel Dunbar
f5c18461e3
Lift out GetNamedIvarList.
...
Drop uses of GetFirstInvarInRecord, instead we lookup the ivars we
know are in the record.
- This is somewhat less efficient, but I need to detangle this code
first...
llvm-svn: 69579
2009-04-20 06:54:31 +00:00
Daniel Dunbar
caec0238bc
Don't emit ivar offsets for unnamed bit fields.
...
Also, added assertion that the field matches what would be looked up.
llvm-svn: 69572
2009-04-20 05:53:40 +00:00
Daniel Dunbar
5d5dbb1754
Remove non-const form of lookupFieldDeclForIvar.
...
llvm-svn: 69563
2009-04-20 00:37:55 +00:00
Daniel Dunbar
ae03226bc6
Comment fixes.
...
llvm-svn: 69562
2009-04-20 00:33:43 +00:00
Daniel Dunbar
554fd79b38
Lift GetClassSizeInfo out of GenerateClass, add a FIXME.
...
- No functionality change.
llvm-svn: 69561
2009-04-19 23:41:48 +00:00
Chris Lattner
b433b279f3
Fix rdar://6804402 - crash on objc implementations declared with
...
@class but no implementation. This was broken in all 3 runtime
impls.
llvm-svn: 69512
2009-04-19 06:02:28 +00:00
Daniel Dunbar
9a7a78b0ae
Fix bug in computation of ivar offsets for (adjacent) bitfields.
...
- The confusing IRgen bitfield interface is partly to blame here;
fixing the functional error for now, cleanups to the interface to
follow.
llvm-svn: 69503
2009-04-19 02:03:42 +00:00
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