Rafael Espindola
b7f60e3474
Add unnamed_addr when creating artificial string globals. For example, in
...
static const char foo[] = "foo";
static const char *bar = "bar";
the global created to hold "bar" will have it, but foo will not.
llvm-svn: 123192
2011-01-10 22:34:03 +00:00
Fariborz Jahanian
3aa19e9a70
Fold -fobjc-nonfragile-abi2 into -fobjc-nonfragile-abi.
...
// rdar://8818375
llvm-svn: 122831
2011-01-04 20:05:20 +00:00
Fariborz Jahanian
9a7d57d57f
Consider zero-length array of structs when
...
computing ivar layouts for objc-gc.
Fixes // rdar://8800513
llvm-svn: 122762
2011-01-03 19:23:18 +00:00
David Chisnall
6f0a7d224b
Fix for PR8695.
...
llvm-svn: 122564
2010-12-26 20:12:30 +00:00
Ted Kremenek
1d56c9eed7
Add -fobjc-default-synthesized-properties flag
...
to allow us to explicitly control whether or
not Objective-C properties are default synthesized.
Currently this feature only works when using
the -fobjc-non-fragile-abi2 flag (so there is
no functionality change), but we can now turn
off this feature without turning off all the features
coupled with -fobjc-non-fragile-abi2.
llvm-svn: 122519
2010-12-23 21:35:43 +00:00
Fariborz Jahanian
522eb7b894
ivars craeted for explicit @synthesize and those
...
created for auto-synthesis are @private .
Fixes: // rdar://8769582
llvm-svn: 121913
2010-12-15 23:29:04 +00:00
John McCall
9bc2677b8c
Do unary conversions on vararg arguments and *then* special-case float.
...
Fixes PR8742.
llvm-svn: 121022
2010-12-06 18:36:11 +00:00
John McCall
211e699754
Don't crash when initializing a subaggregate in C from a property r-value.
...
llvm-svn: 120899
2010-12-04 09:03:57 +00:00
John McCall
0692a32a3e
Test case for the l-value base only being evaluated once.
...
Also, move the l-value emission code into CGObjC.cpp and teach it, for
completeness, to store away self for a super send.
Also, inline the super cases for property gets and sets and make them
use the correct result type for implicit getter/setter calls.
llvm-svn: 120887
2010-12-04 03:11:00 +00:00
Fariborz Jahanian
50198098b9
IR Gen. part of API support for __block cxx
...
objects imported into blocks. //rdar://8594790.
Will have a test case coming (as well as one
sent to llvm test suite).
llvm-svn: 120713
2010-12-02 17:02:11 +00:00
Fariborz Jahanian
2a5deb56a4
Adding couple of Block API, a bug fix and
...
a test change, all for blocks. wip.
llvm-svn: 118745
2010-11-11 00:11:38 +00:00
Devang Patel
82abab0812
test case for r118726.
...
llvm-svn: 118727
2010-11-10 22:19:57 +00:00
Fariborz Jahanian
d11da7e52a
Restore patch reversed in r118475. Fixes
...
// rdar://8632525
llvm-svn: 118634
2010-11-09 21:38:20 +00:00
Fariborz Jahanian
3655e59688
Reverse patch for // rdar://8632525. It might
...
has broken a build.
llvm-svn: 118475
2010-11-09 02:24:08 +00:00
Fariborz Jahanian
94ad274c24
Provide a precise builtin declaration for objc_msgSend
...
to avoid a bogus warning. Fixes //rdar: //8632525
llvm-svn: 118451
2010-11-08 22:53:18 +00:00
Devang Patel
f79199d140
Tidy up MIPS_linkage name. Provide it only if it does not match regular name, otherwise it confuses debugger.
...
This is tested by local.C in llvmgcc testsuite.
llvm-svn: 117107
2010-10-22 17:11:50 +00:00
Fariborz Jahanian
50c925fe96
This patch implements Next's IRGen for -fconstant-string-class=class-name.
...
PR6056, //rdar: //8564463
llvm-svn: 116819
2010-10-19 17:19:29 +00:00
Fariborz Jahanian
f34011e4ca
patch fixes class names missing from method names in debug information for
...
synthesized property. // rdar: //8498026
llvm-svn: 116717
2010-10-18 17:51:06 +00:00
John McCall
d509182336
Coding by inspection has its problems.
...
llvm-svn: 116672
2010-10-16 16:34:08 +00:00
John McCall
17afe45a87
objc_exception_rethrow does not take an exception argument.
...
rdar://problem/8535238
llvm-svn: 116663
2010-10-16 08:21:07 +00:00
Daniel Dunbar
622581b73b
Revert r116656, "IRgen/Obj-C/NeXT: Fix the IR signature for
...
objc_exception_rethrow, so we don't...", since something is actually trying to
call this with the wrong signature (!). Unfortunately I don't understand the new
EH infrastructure well enough to fix it immediately.
llvm-svn: 116660
2010-10-16 05:04:10 +00:00
Daniel Dunbar
90bb5c2315
IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
...
generate unnecessary %al clear on x86_64.
llvm-svn: 116656
2010-10-16 04:08:16 +00:00
Douglas Gregor
f10c97f36e
_Bool is not a keyword in C++. Fixes PR7388 and PR8349.
...
llvm-svn: 116422
2010-10-13 20:00:38 +00:00
Fariborz Jahanian
d06ab4f09e
Test for //rdar: //8493239
...
llvm-svn: 116258
2010-10-11 23:15:47 +00:00
Daniel Dunbar
7cba5a76dd
IRgen/Obj-C: Fix encoding of "long double".
...
- The mind boggles.
llvm-svn: 116226
2010-10-11 21:13:48 +00:00
Daniel Dunbar
a441d81b6b
Merge encode-test-1.m into encode-test.m
...
llvm-svn: 116225
2010-10-11 21:13:46 +00:00
Daniel Dunbar
32708f952b
FileCheck'ize test.
...
llvm-svn: 116224
2010-10-11 21:13:44 +00:00
Daniel Dunbar
355e850c6c
tests: Tweak test to also match MSVC format.
...
llvm-svn: 115969
2010-10-07 20:14:30 +00:00
John McCall
569eafce63
Re-enable EH cleanups to destroy __block variables, now that we have a moment to
...
deal with the consequences. Fixes rdar://problem/8224178.
llvm-svn: 115816
2010-10-06 18:56:43 +00:00
John McCall
9916e3fa93
In the fragile ObjC ABI, save the caught exception to the side if there are
...
both @catches and a @finally, because the second call to @objc_exception_try_enter
will clobber the exception slot. Fixes rdar://problem/8440970.
llvm-svn: 115575
2010-10-04 23:42:51 +00:00
Fariborz Jahanian
de744dcce1
Restore test. Is for //rdar://8493239
...
llvm-svn: 115349
2010-10-01 21:26:26 +00:00
Fariborz Jahanian
220d971ace
Remove test until further notice.
...
llvm-svn: 115258
2010-10-01 01:01:03 +00:00
Fariborz Jahanian
ef1fb2d1d1
Fix test.
...
llvm-svn: 115253
2010-10-01 00:27:17 +00:00
Fariborz Jahanian
885e9dff93
Output debug info. for ivars declared in class
...
extension and implementation.
Fixes rdar://8493239.
llvm-svn: 115248
2010-10-01 00:01:53 +00:00
Devang Patel
7c086227e6
Attach aritifical attribute with implicit parameters.
...
Radar 8493141.
llvm-svn: 115104
2010-09-29 23:09:21 +00:00
Chris Lattner
775e635b5a
update a bunch of tests that are using the x86 backend instead of grepping IR :(
...
llvm-svn: 114535
2010-09-22 06:09:31 +00:00
Fariborz Jahanian
0aa35b9cf5
Block description for trivial block literals have
...
their 'isa' field scanned regardless.
llvm-svn: 113749
2010-09-13 16:09:44 +00:00
Fariborz Jahanian
933c6723a4
Fixes an obscure bug in importd block variable layout
...
information when imported variable is used
more than once. Originally though to be a bug in importing
block varibles. Fixes radar 8417746.
llvm-svn: 113675
2010-09-11 01:27:29 +00:00
Fariborz Jahanian
cfddabf5a3
Block ivar layout must assume that the 'isa'
...
field of the block descriptor is GC'able (scanned)
as this what the runtime expects (one can send it
messages). Radar 8394947.
llvm-svn: 113454
2010-09-09 00:21:45 +00:00
Fariborz Jahanian
366a94822b
Local static block variable referecned in its
...
block-literal initializer expression causes IRgen to crash.
This patch fixes by saving it in StaticLocalDecl map
already used for such purposes. (radar 8390455).
llvm-svn: 113307
2010-09-07 23:26:17 +00:00
Argyrios Kyrtzidis
2fdb5b5955
LastFieldBitfield in CGObjCCommonMac::BuildAggrIvarLayout keeps bitfields or unnamed fields but later the code
...
assumes that it's always a bitfield. This can lead to a crash (reported at rdar://8368320).
llvm-svn: 113154
2010-09-06 12:00:10 +00:00
Fariborz Jahanian
60babfb8a1
Casting of a property reference to 'void' did not
...
generate the necessary code. This patch fixes it.
// rdar://8389655
llvm-svn: 113079
2010-09-04 19:49:18 +00:00
Daniel Dunbar
09c8fbe812
tests: Fix a dependency on the temporary value names.
...
llvm-svn: 112917
2010-09-03 00:24:06 +00:00
Daniel Dunbar
a70fab8dd7
IRgen/Obj-C: Rewrite Objective-C bit-field access to compute the access strategy
...
using the same methods as used for normal structures.
- This fixes problems with reading past the end of the structure and with
handling straddled bit-field access.
llvm-svn: 112914
2010-09-02 23:53:31 +00:00
Chris Lattner
369721a16e
stop looking for #uses comments.
...
llvm-svn: 112898
2010-09-02 22:48:26 +00:00
Devang Patel
9cd85d1c77
Robustify test.
...
llvm-svn: 112062
2010-08-25 17:32:22 +00:00
Daniel Dunbar
5eb22ab7d8
tests: Disable this test for now, it is overly pessimistic and I am not sure how to fix it.
...
llvm-svn: 112023
2010-08-25 03:40:27 +00:00
Fariborz Jahanian
bf9294fb65
Support for IRGen of synthesize bitfield ivars in
...
objc-nonfragile-abi2 (radar 7824380).
llvm-svn: 111823
2010-08-23 18:51:39 +00:00
Fariborz Jahanian
68e69ca9f9
Patch to issue warning when colllection expresion's type
...
does not implement 'countByEnumeratingWithState' API.
Implements radar 7634669.
llvm-svn: 110964
2010-08-12 22:25:42 +00:00
John McCall
ffe4630f3d
When re-raising an exception after a cleanup, we need to call _Unwind_Resume_or_Rethrow
...
instead of _Unwind_Resume. With SJLJ exceptions, this is spelled
"_Unwind_SjLj_Resume_or_Rethrow", not "_Unwind_SjLj_Resume", which has
significantly different semantics.
We should actually never be generating a call to _Unwind_SjLj_Resume directly;
even if we were generating true cleanups (which we aren't because of the
horrible hack), we should be calling __cxa_end_cleanup() on ARM. I
haven't implemented this because there's little point as long as the HH is
present.
I believe this fixes <rdar://problem/8281377>.
llvm-svn: 110851
2010-08-11 20:59:53 +00:00