Fariborz Jahanian
34f521ce9c
Test for my last patch.
...
llvm-svn: 99194
2010-03-22 18:27:27 +00:00
Fariborz Jahanian
eb1690d2bd
Fix the test some more.
...
llvm-svn: 98090
2010-03-09 22:17:52 +00:00
Fariborz Jahanian
9d227a1d5e
See if this test makes it though buildbot.
...
llvm-svn: 98087
2010-03-09 21:50:08 +00:00
Fariborz Jahanian
86048dc2e5
Reverse the code gen. enabled part of test until I can figure out
...
how to check the code pattern no matter how clang is built.
llvm-svn: 98079
2010-03-09 21:26:24 +00:00
Fariborz Jahanian
525f34133d
Code gen test for a previous patch for
...
radar 7709015
llvm-svn: 98073
2010-03-09 19:15:10 +00:00
Fariborz Jahanian
281aae6328
Fix code gen bug generating code for
...
((id)cat)->isa. Fixes radar 7709015.
llvm-svn: 97672
2010-03-03 22:09:47 +00:00
John McCall
8ee376f08a
Canonicalize parameter and return types before computing ABI info. Eliminates
...
a common source of oddities and, in theory, removes some redundant ABI
computations. Also fixes a miscompile I introduced yesterday by refactoring
some code and causing a slightly different code path to be taken that
didn't perform *parameter* type canonicalization, just normal type
canonicalization; this in turn caused a bit of ABI code to misfire because
it was looking for 'double' or 'float' but received 'const float'.
llvm-svn: 97030
2010-02-24 07:14:12 +00:00
Fariborz Jahanian
40efb08d87
Remove this test for now.
...
llvm-svn: 96651
2010-02-19 01:40:48 +00:00
Fariborz Jahanian
ad238e2bde
XFAIL until I can fugure out how test check for a pattern when
...
clang is built optimized.
llvm-svn: 96645
2010-02-19 01:11:52 +00:00
Fariborz Jahanian
aef662206b
Patch removes IVars list from ObjCInterfaceDecl and
...
instead relies on their DeclContext for iteration, etc.
llvm-svn: 96638
2010-02-19 00:31:17 +00:00
Fariborz Jahanian
46dbcb2f86
Hopefully make buildbot happy.
...
llvm-svn: 96513
2010-02-17 21:01:05 +00:00
Fariborz Jahanian
999ddbcf8e
Patch to remove arbitrary imporation of 'self' into
...
a block without it being used. This causes over release
of objects in certain runtime-senitive apps.
(fixes radar 7581175).
llvm-svn: 96501
2010-02-17 19:54:08 +00:00
Fariborz Jahanian
989908fbac
Generate the objc_read_weak API when calling
...
a __weak block. Fixes radar 7628591.
llvm-svn: 95822
2010-02-10 23:34:57 +00:00
Daniel Dunbar
3241d400c8
Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
...
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.
llvm-svn: 95787
2010-02-10 18:49:11 +00:00
Fariborz Jahanian
df506b934e
Fix a code gen bug accessing 'isa' field via a message call
...
(Fixes radar 7609722).
llvm-svn: 95406
2010-02-05 19:18:30 +00:00
Fariborz Jahanian
08d614d92e
Fix DeclContext of an objective-c @catch variable
...
declaration. Fixes radar 7590273.
llvm-svn: 95164
2010-02-03 00:01:43 +00:00
Daniel Dunbar
ca5e3eb7f7
NeXT: Add support for -fobjc-legacy-dispatch.
...
llvm-svn: 95005
2010-02-01 21:07:33 +00:00
Daniel Dunbar
d86666ffd7
Driver/Darwin: Stuff iPhoneOS into environment portion of the (llvm/clang) triple instead of keying off architecture. Also, fix version define to properly include the revision/micro component of the version number.
...
llvm-svn: 94487
2010-01-26 01:44:04 +00:00
Chris Lattner
1df52e7d6a
merge another one in.
...
llvm-svn: 94404
2010-01-25 03:38:26 +00:00
Chris Lattner
fe28ef686e
consolidate two testcases.
...
llvm-svn: 94403
2010-01-25 03:37:52 +00:00
Chris Lattner
83b0dd16c3
fix rdar://7556129 a crash in blocks debug info codegen.
...
llvm-svn: 94402
2010-01-25 03:34:56 +00:00
Anders Carlsson
1749083e2e
Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824.
...
llvm-svn: 92142
2009-12-24 20:40:36 +00:00
Anders Carlsson
b2d47e0eaa
Add a test for x86-64 struct returns under gc.
...
llvm-svn: 92140
2009-12-24 20:21:41 +00:00
Sean Callanan
12ca3f46d8
Testcase fixes to reflect instruction table changes in the LLVM backend
...
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20091214/092780.html )
The instruction fixes were checked and approved by Chris Lattner, but
these testcase fixes are mine; please yell at me if there are any
problems with either.
* PR5050-constructor-conversion.cpp
* array-construction.cpp
* constructor-conversion.cpp
* cast-conversion.cpp
* constructor-default-arg.cpp
* derived-to-base-conv.cpp
* ptr-to-member-function.cpp
* call-arg-zero-temp.cpp
* default-destructor-synthesis.cpp
* global-array-destruction.cpp
* array-operator-delete-call.cpp
* decl-ref-init.cpp
* default-constructor-for-members.cpp
* convert-to-fptr.cpp
* constructor-for-array-members.cpp
* conversion-function.cpp
* objc-read-weak-byref.m
Fixed testcase to reflect call qualifier
llvm-svn: 91640
2009-12-18 00:04:09 +00:00
Daniel Dunbar
5618e98f33
Update tests to use %clang instead of 'clang', and forcibly disable use of '
...
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).
llvm-svn: 91460
2009-12-15 22:01:24 +00:00
Fariborz Jahanian
2b9fc83db5
Fixes a code gen bug related to accessing a now
...
non-existing 'isa' field of a non-existing struct type
all related to legacy type definition for 'id' which we have
dropped in clang in favor of a built-in type.
(fixes radar 7470820).
llvm-svn: 91455
2009-12-15 21:34:52 +00:00
Daniel Dunbar
8fbe78f6fc
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
...
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Fariborz Jahanian
3914ee8fcd
Make test more generic.
...
llvm-svn: 91349
2009-12-14 22:17:35 +00:00
Fariborz Jahanian
9ac0a04b29
Patch to fix 32-bit @try failure with internal assertion when compiling
...
an Objective-C rethrow nested inside another try/catch block. (fixes radar 7466728).
llvm-svn: 91335
2009-12-14 21:35:01 +00:00
Fariborz Jahanian
d83359ac82
Make test pass in all cases.
...
llvm-svn: 91309
2009-12-14 18:38:32 +00:00
Fariborz Jahanian
df9f4c6655
Fixes an incomplete test case.
...
llvm-svn: 91304
2009-12-14 18:18:29 +00:00
Fariborz Jahanian
4ee3981574
Tests use the new clang.
...
llvm-svn: 91290
2009-12-14 17:13:18 +00:00
Daniel Dunbar
85d2f8f875
Use clang -cc1 in test, to improve determinism.
...
llvm-svn: 91236
2009-12-13 02:20:49 +00:00
Fariborz Jahanian
751c1e7b24
patch to add a property from a protocol to a class that adopts the protocol.
...
(fixes radar 7466494).
llvm-svn: 91227
2009-12-12 21:26:21 +00:00
Fariborz Jahanian
531c16f9fb
Code gen for ObjCIsaExpr AST used as lvalue.
...
(fixes radar 7457534).
llvm-svn: 90995
2009-12-09 23:35:29 +00:00
Fariborz Jahanian
a5fee26d28
Codegen. support for ObjCIsaExpr AST which until now
...
was not needed (fixes radar 7453430).
llvm-svn: 90981
2009-12-09 19:05:56 +00:00
Fariborz Jahanian
a6227fd896
(objc2 nonfragile-abi specific). If the translation unit includes an implementation
...
of a subclass (direct or indirect) of a weak_import root class, emit a weak reference
for the root class's metaclass (should complete radar 6815425).
llvm-svn: 90249
2009-12-01 18:25:24 +00:00
Fariborz Jahanian
89b660c774
Fix a crash when ivar type is a __strong SEL. Fallout from
...
recent change to make SEL a builtin type (fixes radar 7425510).
llvm-svn: 90145
2009-11-30 18:43:52 +00:00
Daniel Dunbar
e97582406b
Use '-FOO' 'BAR' instead of '-FOO=BAR' for FOO in -stack-protector, -fvisibility, and -fconstant-string-class.
...
llvm-svn: 90072
2009-11-29 09:33:20 +00:00
Daniel Dunbar
4e7596cc3a
Normalize options to use '-FOO' instead of '--FOO'.
...
llvm-svn: 90071
2009-11-29 09:33:10 +00:00
Fariborz Jahanian
04b258cc9e
Allow user re-definition of SEL as well as accessing its fields.
...
This fixes pr5611.
llvm-svn: 89895
2009-11-25 23:07:42 +00:00
Fariborz Jahanian
d25c219475
Fixe a crash in encoding of SEL type caused by recent changes.
...
llvm-svn: 89696
2009-11-23 20:40:50 +00:00
David Chisnall
27033c9171
Test case for bug fixed in r89457.
...
llvm-svn: 89605
2009-11-22 17:42:02 +00:00
Fariborz Jahanian
252ba5fb6f
This patch implements objective-c's 'SEL' type as a built-in
...
type and fixes a long-standing code gen. crash reported in
at least two PRs and a radar. (radar 7405040 and pr5025).
There are couple of remaining issues that I would like for
Ted. and Doug to look at:
Ted, please look at failure in Analysis/MissingDealloc.m.
I have temporarily added an expected-warning to make the
test pass. This tests has a declaration of 'SEL' type which
may not co-exist with the new changes.
Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp.
I think the changes which I have ifdef'ed out are correct. They
need be considered for in a few Indexer/PCH test cases.
llvm-svn: 89561
2009-11-21 19:53:08 +00:00
Fariborz Jahanian
95ace55701
This patch finalizes implementatin of weak_import
...
objective-c2 classes (radar 6815425).
llvm-svn: 89157
2009-11-17 22:42:00 +00:00
Daniel Dunbar
f386ce5429
... and add back a few more triple forces.
...
llvm-svn: 89088
2009-11-17 10:27:58 +00:00
Daniel Dunbar
cba26d4dc5
Add some -triples I was a little too liberal in removing.
...
llvm-svn: 89084
2009-11-17 10:04:38 +00:00
Daniel Dunbar
7e4ae04bed
Merge several visibility tests into hidden-visibility.m, and check .ll output
...
not .s output.
llvm-svn: 89083
2009-11-17 10:04:28 +00:00
Daniel Dunbar
fba0b44d35
Use -fblocks and -fobjc-nonfragile-abi when that is what is being tested, instead of forcing the triple.
...
llvm-svn: 89072
2009-11-17 09:04:12 +00:00
Daniel Dunbar
feedba68b5
Don't #include <stdio.h> when tests don't need it, or use clang instead of clang-cc when they do.
...
llvm-svn: 89070
2009-11-17 08:57:36 +00:00
Daniel Dunbar
4656c53e12
Move -fnext-runtime defaulting to driver (and change clang-cc default to
...
-fnext-runtime), instead of using getDefaultLangOptions.
llvm-svn: 89058
2009-11-17 07:07:28 +00:00
Fariborz Jahanian
9290ede494
Handle case of missing '@end' in implementation context
...
gracefully, on par with gcc, by: Issuing a warning,
doing final sematinc check of its definitions and generating
its meta-data.
llvm-svn: 88934
2009-11-16 18:57:01 +00:00
Fariborz Jahanian
eb80c98a72
Fix a code gen bug in i386-apple-darwin (objc fragile abi), sending
...
message to 'super'. Fixes radar 7205866.
llvm-svn: 87017
2009-11-12 20:14:24 +00:00
Daniel Dunbar
34546ce43d
Remove RUN: true lines.
...
llvm-svn: 86432
2009-11-08 01:47:25 +00:00
Daniel Dunbar
8b57697954
Eliminate &&s in tests.
...
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
llvm-svn: 86430
2009-11-08 01:45:36 +00:00
Daniel Dunbar
a530841b4f
Switch XFAIL format to match LLVM.
...
llvm-svn: 85880
2009-11-03 07:25:45 +00:00
Steve Naroff
f0c8611d3f
Fix <rdar://problem/7330784>. Avoid crashing on 'Class<p>' when generating meta-data for a class.
...
llvm-svn: 85440
2009-10-28 22:03:49 +00:00
Daniel Dunbar
c14753b781
Fix crash when synthesizing property setters when the property type and ivar
...
type have mismatched Objective-C types.
- <rdar://problem/7336352> [irgen] crash in synthesized property construction
llvm-svn: 85275
2009-10-27 19:21:30 +00:00
Devang Patel
232f278fc1
Disable tests that check debug info intrinsic. This does not work if debug info intrinsics are not used to encode debug info.
...
llvm-svn: 83929
2009-10-12 23:46:58 +00:00
Fariborz Jahanian
07ca72725a
Generate weak read barriers when reading a weak __block
...
variable inside the block.
llvm-svn: 83729
2009-10-10 20:07:56 +00:00
Mike Stump
f8c1f0d1f0
Speed up testing by avoiding stdio.h, also helps testing on windows.
...
Patch by John Thompson.
llvm-svn: 83593
2009-10-08 23:05:06 +00:00
Fariborz Jahanian
092cd6e624
Patch to implement Protocols on class extensions.
...
<rdar://problem/7269631> Protocols on class extensions don't work
llvm-svn: 83322
2009-10-05 20:41:32 +00:00
Fariborz Jahanian
e01e434aef
<rdar://problem/7263113> Make clang produce gcc's objc_assign_StrongCast as a result of type-cast of an ivar in assignment.
...
llvm-svn: 83150
2009-09-30 17:10:29 +00:00
Anders Carlsson
0374742326
Use ABIArgInfo::getDirect() for all types that have a pointer representation.
...
llvm-svn: 82845
2009-09-26 03:56:53 +00:00
John McCall
6cb02c1d7e
Add a reduced test case for the weak ivar infinite recursion.
...
llvm-svn: 82747
2009-09-25 02:18:37 +00:00
Daniel Dunbar
0512647362
Force triple in test.
...
llvm-svn: 82519
2009-09-22 03:50:39 +00:00
Daniel Dunbar
a25a9dff0d
Add test case for PR4894 (it was fixed in LLVM).
...
llvm-svn: 82510
2009-09-22 02:18:40 +00:00
Fariborz Jahanian
71848a3ff1
Removed -fobjc-newgc-api option. clang now conforms to
...
gcc-style write-barrier api only.
llvm-svn: 82493
2009-09-21 23:03:37 +00:00
Fariborz Jahanian
a74039426d
-fobjc-newgc-api is now the default.
...
llvm-svn: 82478
2009-09-21 20:17:37 +00:00
Fariborz Jahanian
38c3ae9bc4
Miscellanous fixes in generatation of objc gc's write-barriers.
...
llvm-svn: 82472
2009-09-21 18:54:29 +00:00
Daniel Dunbar
23c1ae7fae
Force a triple.
...
llvm-svn: 82216
2009-09-18 08:46:07 +00:00
Fariborz Jahanian
2e32ddc7ba
Fixed a bug in generation of the new write-barriers when
...
array syntax is used to derefernce and assign to ivar pointee.
llvm-svn: 82183
2009-09-18 00:04:00 +00:00
Daniel Dunbar
51418c3b90
Force triple for tests using __strong.
...
llvm-svn: 82133
2009-09-17 07:21:40 +00:00
Daniel Dunbar
df0e62d0a1
IRgen/ObjC: Correctly construct the function info for variadic message sends.
...
This fixes some bad -O0 codegen and the unnecessary clearing of al on entry to objc_msgSend for most message sends.
<rdar://problem/7102824> [irgen] unnecessary xorb on calls to objc_msgSend on x86_64
llvm-svn: 82118
2009-09-17 04:01:40 +00:00
Daniel Dunbar
db7ec04fed
Force triple, although probably the real fix is to tie __strong to -fobjc-gc.
...
llvm-svn: 82101
2009-09-17 00:28:00 +00:00
Fariborz Jahanian
1ff8299c67
Removed useless stuff from the test.
...
llvm-svn: 82095
2009-09-16 23:52:53 +00:00
Fariborz Jahanian
0bdc001b6e
More test for objc gc's mixed write-barriers.
...
llvm-svn: 82094
2009-09-16 23:49:04 +00:00
Fariborz Jahanian
e29f04859b
Additional tests for write-bariers.
...
llvm-svn: 82092
2009-09-16 23:38:26 +00:00
Fariborz Jahanian
5f41a8c4af
Test for variety of write-barriers.
...
llvm-svn: 82091
2009-09-16 23:30:59 +00:00
Fariborz Jahanian
de1d324dce
patch for generating objc'2 objc_assign_ivar. WIP.
...
llvm-svn: 82090
2009-09-16 23:11:23 +00:00
Fariborz Jahanian
a7fa6beb2e
Starting patch to generate more specific API for objc's
...
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.
llvm-svn: 82082
2009-09-16 21:37:16 +00:00
Fariborz Jahanian
cceedbff27
Do not generate write-barrier in indirect assignment to
...
a weak object.
llvm-svn: 82061
2009-09-16 18:09:18 +00:00
Daniel Dunbar
42684d5af8
Force triple to avoid spurious differences due to runtime choice.
...
llvm-svn: 81666
2009-09-13 01:45:29 +00:00
Fariborz Jahanian
8d6298b272
Fix a regression where write-barrier was not being generated
...
for block pointer.
llvm-svn: 81479
2009-09-10 23:38:45 +00:00
Fariborz Jahanian
2cde203392
Non fragile ABI for GNU runtime. Patch bu David Chisnall.
...
llvm-svn: 81462
2009-09-10 21:48:21 +00:00
Fariborz Jahanian
063c7720f4
More objc GC's API work for array of pointers declared
...
as __strong.
llvm-svn: 81283
2009-09-08 23:38:54 +00:00
Fariborz Jahanian
b17a190186
Fixes a regression in generating objc's GC API
...
in assiging to c pointer types with a GC'able
attribute.
llvm-svn: 81244
2009-09-08 19:45:47 +00:00
Anders Carlsson
2fb0824197
Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!
...
llvm-svn: 81237
2009-09-08 18:24:21 +00:00
Fariborz Jahanian
f0ff9832ba
Test for generation of objc_assign_strongCast in a variety of
...
situations.
llvm-svn: 81129
2009-09-06 19:44:57 +00:00
Fariborz Jahanian
1a50477385
Fixed a property getter ir-gen crash.
...
llvm-svn: 80681
2009-09-01 17:02:21 +00:00
Fariborz Jahanian
879d726608
Re-implemented generation of objc_memmove_collectable
...
API for copying GC'able aggregates (Next runtime only).
llvm-svn: 80607
2009-08-31 19:33:16 +00:00
David Chisnall
5778fce141
Updated GNU runtime non-fragile ABI.
...
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.
llvm-svn: 80591
2009-08-31 16:41:57 +00:00
Fariborz Jahanian
68f051594b
Test case for r79968 (courtesy of Anders).
...
llvm-svn: 79998
2009-08-25 16:09:22 +00:00
Devang Patel
79e3fa6e9d
Remove a test that relies on old debug info format.
...
llvm-svn: 79979
2009-08-25 06:18:11 +00:00
Fariborz Jahanian
7c07d5fed8
Remove ivarlayout bitmap optimization, instead if all zeros,
...
put out the bitmap when all objects are scanned.
llvm-svn: 79947
2009-08-24 21:55:06 +00:00
Daniel Dunbar
2a4061929f
Fix some made up triples.
...
llvm-svn: 79316
2009-08-18 05:30:27 +00:00
Daniel Dunbar
97ea867690
MultiTestRunner: Validate '&&' at the end of RUN lines.
...
- This is just to normalize, these will go away soon hopefully.
Added all the missing '&&'s that have crept in. :)
llvm-svn: 77062
2009-07-25 11:27:37 +00:00
Anders Carlsson
e2c6baf629
Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.
...
llvm-svn: 76978
2009-07-24 17:23:54 +00:00
Steve Naroff
3de6b70730
Fix a couple recent ABI regressions noticed during code review (fallout from the ObjC type system rewrite).
...
It's unfortunate that the mangling includes the low-level structs. Nevertheless, we need this for binary compatibility with GCC.
llvm-svn: 76755
2009-07-22 17:14:51 +00:00
Mike Stump
087a3f7e0d
Prep for new warning.
...
llvm-svn: 76637
2009-07-21 20:50:41 +00:00
Argyrios Kyrtzidis
d0a31d2c5a
Remove a file from the test directory that was added by mistake.
...
llvm-svn: 76518
2009-07-21 00:17:57 +00:00
Argyrios Kyrtzidis
851b208a20
Use temporary output to avoid running index-test with the same commands multiple times.
...
llvm-svn: 76513
2009-07-21 00:06:46 +00:00
Sebastian Redl
c88ab62c87
Fix RUN line to not litter the test directory.
...
llvm-svn: 76320
2009-07-18 15:13:36 +00:00
Fariborz Jahanian
c3443a3bf3
ir-gen for --/++ operators of objc object pointers
...
in 32bit abi.
llvm-svn: 76109
2009-07-16 22:04:59 +00:00
Devang Patel
894caff444
Enable. Now the LLVM dwarfwriter does not print extra '1' prefix in symbol names (rev. 75875)
...
llvm-svn: 75876
2009-07-16 01:02:47 +00:00
Devang Patel
9be7b20401
Revert 75648 for now. It is causing test failures.
...
llvm-svn: 75684
2009-07-14 21:31:22 +00:00
Devang Patel
d6c256696b
Use LLVM mangler to get mangled name for debug info entry.
...
llvm-svn: 75589
2009-07-14 02:47:58 +00:00
Daniel Dunbar
f5c79709bc
Update debug info generation for ObjCObjectPointer changes.
...
- Previously this would crash on recursive types, and it was also incorrectly
stripping off a level of indirection.
- I'm not 100% convinced this is all correct, but it should be a monotonic
improvment.
llvm-svn: 75582
2009-07-14 01:20:56 +00:00
Devang Patel
caadf8c9dc
I just revertd llvm patch.
...
XFAIL this for now until I prepare clang specific patch.
llvm-svn: 75575
2009-07-14 00:56:16 +00:00
Devang Patel
450f266095
New testcase for rev 75503.
...
llvm-svn: 75504
2009-07-13 21:20:20 +00:00
Devang Patel
9c3a0188cd
Update debug info type cache after fwd decl is replaced by real decl.
...
llvm-svn: 75473
2009-07-13 17:03:14 +00:00
Daniel Dunbar
024c68b734
Force NeXT runtime for this test.
...
llvm-svn: 75400
2009-07-11 23:04:43 +00:00
Daniel Dunbar
7e5f052772
Fix type conversion of ObjCObjectPointerType.
...
- Previous code was based on a misunderstanding (on my part) of the type
representation.
llvm-svn: 75385
2009-07-11 21:12:14 +00:00
Daniel Dunbar
9d82da40ec
Generate correct prototype for objc_enumerationMutation.
...
- This was a latent bug exposed by the recent objc type changes.
llvm-svn: 75383
2009-07-11 20:32:50 +00:00
Steve Naroff
7cae42b07a
This patch includes a conceptually simple, but very intrusive/pervasive change.
...
The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.
This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.
By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.
Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.
llvm-svn: 75314
2009-07-10 23:34:53 +00:00
Fariborz Jahanian
8e0d04249d
Patch adds test to my previous patch for assigning to
...
gc'able structs in the Next runtime and adds missing
PCH info.
llvm-svn: 75014
2009-07-08 16:37:44 +00:00
Fariborz Jahanian
248c719a68
Patch fixes an obscure bug when 'used' attribute is applied to
...
variables in ObjC's Next runtime mode. Next runtime also implicitly applies
'used' attribute on some of its meta-data. This results in two
'llvm.used' arrays to be generated, and one of them is renamed to
'llvm.used1'.
llvm-svn: 74008
2009-06-23 21:47:46 +00:00
Fariborz Jahanian
45da0c9013
Test modification.
...
Patch by Jean-Daniel Dupas
llvm-svn: 73343
2009-06-14 16:45:35 +00:00
Daniel Dunbar
2f554fadcd
Don't include system headers when overriding triple.
...
llvm-svn: 73301
2009-06-13 20:02:26 +00:00
Daniel Dunbar
c0467f36f2
Force Obj-C runtime version for this test
...
llvm-svn: 73300
2009-06-13 19:40:25 +00:00
Daniel Dunbar
76d864c7e7
Support complex properties, ivars and message expressions.
...
llvm-svn: 73158
2009-06-10 04:38:50 +00:00
Mike Stump
cbc2bcaf17
As an optimization, we maintain a cache of generated
...
___Block_byref_id_object_dispose and ___Block_byref_id_object_copy
functions so that we can simply reuse instead of creating a new one.
Additionally, add an assert to ensure no one yet tries to align a
__block variable beyond the alignment of a pointer as the codegen is
incomplete.
llvm-svn: 72974
2009-06-05 23:26:36 +00:00
Fariborz Jahanian
b68215c4de
Place the GC attribute on the same relative pointer
...
position to make it consistant and to match gcc's behavior,
by placing it at the inner-most pointer.
llvm-svn: 72784
2009-06-03 17:15:17 +00:00
Fariborz Jahanian
c6d9800564
A corner case of objc2 gc's write-barrier generation
...
for the Next runtime.
llvm-svn: 72703
2009-06-01 21:29:32 +00:00
Fariborz Jahanian
bc60ee2215
Fixed a test case which I am to blame for making it
...
not runaable.
llvm-svn: 72695
2009-06-01 17:40:54 +00:00
Fariborz Jahanian
7c1baf46d6
No write-barrier for initializations.
...
llvm-svn: 72492
2009-05-27 19:54:11 +00:00
Fariborz Jahanian
ba74e5daa5
Test for David Chisnall's -fobjc-sender-dependent-dispatch patch.
...
llvm-svn: 72330
2009-05-23 17:03:50 +00:00
Daniel Dunbar
223db1c9e5
Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.
...
- Otherwise we may incorrectly miss generation of some write barriers.
llvm-svn: 72313
2009-05-23 02:49:02 +00:00
Daniel Dunbar
c61d0bd8f1
Debug info: Initialize runtime language field correctly for Objective-C
...
interface types.
llvm-svn: 72036
2009-05-18 20:51:58 +00:00
Daniel Dunbar
f811647c27
Improve test case a wee bit
...
llvm-svn: 72014
2009-05-18 16:49:49 +00:00
Daniel Dunbar
9a017d7fcf
Classes with "+load" methods need to go in the non-lazy class list (or
...
else the method will not be found by the runtime at class load time).
llvm-svn: 71904
2009-05-15 22:33:15 +00:00
Daniel Dunbar
0a2171ccd5
Skip the asm prefix when storing the name in block info.
...
- Otherwise we emit internal names with embedded '\01' characters,
which confuses some tools.
- Ideally all the code which wants to get a "display name" for the
given function should follow one code path, but this should be a
monotonic improvement for now.
llvm-svn: 71774
2009-05-14 16:42:16 +00:00
Daniel Dunbar
7911002bf9
We need to specify the "linkage name" to the subprogram now that we
...
emit the correct "display name". I suspect we need more work here, see
FIXME for example.
llvm-svn: 71761
2009-05-14 01:45:24 +00:00
Daniel Dunbar
0beb7894c4
Make sure not to include the LLVM asm prefix in function names for
...
debug info.
llvm-svn: 71736
2009-05-13 23:08:57 +00:00
Fariborz Jahanian
0f44d81a4c
Patch to implement ivar synthesis of properties declared in protocols
...
only and used in class imllementations (objc2 Nonfragile ABI specific).
llvm-svn: 71571
2009-05-12 18:14:29 +00:00
Fariborz Jahanian
5d5ed2d800
Patch to allow Nonfragile ABI to use 32-bit style legacy
...
message dispage API for all but a few messages. This is
a runtime performance improvement and there is not meant
to be a functional change.
llvm-svn: 71467
2009-05-11 19:25:47 +00:00
Daniel Dunbar
81ded69511
Remove -fobjc-tight-layout, seems to work!
...
llvm-svn: 71184
2009-05-07 21:58:26 +00:00
Fariborz Jahanian
a16904bc41
Fixes a bug for objc2's gc in the presense of type-casts.
...
llvm-svn: 71041
2009-05-05 23:28:21 +00:00
Fariborz Jahanian
32ff7aeefa
Provide basic support for generation of objc2's
...
objc_assign_global API when assigning to global
objective-c object pointer.
llvm-svn: 70939
2009-05-04 23:27:20 +00:00
Daniel Dunbar
9b042e06ee
Fix the field count in interface record layout (it was incorrectly
...
compensating for super classes). This was making the reported class
sizes for empty classes very, very wrong.
- Also, we now report the size info for an empty class like gcc (as
the offset of the start, not as 0, 0).
- Add a few more test cases we were mishandling before (padding bit
field at end of struct, for example).
llvm-svn: 70938
2009-05-04 23:23:09 +00:00
Fariborz Jahanian
c46fff0f5f
Adding more test to ivar-layout-64.m.
...
llvm-svn: 70918
2009-05-04 21:46:27 +00:00
Daniel Dunbar
9252ee1779
Compute interface instanceStart and instanceSize using the record
...
layout.
- This is much simpler / more efficient.
- This also properly computes the size in the presence of bit-fields.
llvm-svn: 70916
2009-05-04 21:26:30 +00:00
Daniel Dunbar
98ba964e5c
Don't allow clients to traverse into superclass synthesized properties
...
via CollectObjCIvars.
- In places where we need them, we should have the implementation and
access the properties through it.
This is a fairly substantial functionality change:
1. @encode no longer encodes synthesized ivars, ever.
2. The ivar layout bitmap no longer encodes information for
synthesized ivars in superclasses. Well, actually I had already
broken that, but it is intentional now.
We are now differing substantially from llvm-gcc and gcc
here. However, in my opinion this fundamentally *must* work if
non-fragile classes are to work. Without this change, the result of
@encode and the ivar layout depend on the order that the
implementation is seen in a file (if it is in the same file with its
superclass). Since both scenarios should work the same, our behavior
is now consistent with gcc behavior as if an implementation is never
seen following an implementation of its superclass.
Note that #2 is only a functionality change when (A) an
implementation appears in the same translation unit with the
implementation of its superclass, and (B) the superclass has
synthesized ivars. My belief is that this situation does not occur in
practice.
I am not yet sure of the role/semantics of @encode when synthesized
ivars are present... it's use is fairly unsound in a non-fragile world.
llvm-svn: 70822
2009-05-04 04:10:48 +00:00
Daniel Dunbar
36e2a1eea3
Use the implementation decl for looking up offset while building the
...
ivar layout.
- The layout needs access to synthesized ivars.
llvm-svn: 70798
2009-05-03 21:05:10 +00:00
Daniel Dunbar
e4eeb07acd
Rename test case
...
llvm-svn: 70797
2009-05-03 20:37:42 +00:00
Fariborz Jahanian
18c435a17d
API for message dispatch of methods returning floats
...
to match gcc's closely.
llvm-svn: 70493
2009-04-30 16:31:11 +00:00
Chris Lattner
7d4f5c47ce
only support int128_t on 64-bit and larger targets. 32-bit targets don't
...
have support for __divti3 and friends.
llvm-svn: 70480
2009-04-30 06:18:40 +00:00
Chris Lattner
f122cef4df
initial support for __[u]int128_t, which should be basically
...
compatible with VC++ and GCC. The codegen/mangling angle hasn't
been fully ironed out yet. Note that we accept int128_t even in
32-bit mode, unlike gcc.
llvm-svn: 70464
2009-04-30 02:43:43 +00:00
Fariborz Jahanian
e55f8660be
Export lazy references of .objc_class_name of class names
...
referenced in a category implementation meta-data
(Next objc 32bit abi).
llvm-svn: 70407
2009-04-29 20:40:05 +00:00
Chris Lattner
669e32f8c0
rdar://6827200 - [sema] reject statically allocated arrays of interface types
...
Upgrade "array of interface" warning to an error. In addition to being a
terrible idea, this crashes codegen.
llvm-svn: 70178
2009-04-27 01:55:56 +00:00
Daniel Dunbar
ef2ffbc390
Fix pointer addressing and array subscripting of Objective-C interface
...
types.
- I broke this in the switch to representing interfaces with opaque
types.
- <rdar://problem/6822660> clang crashes on subscript of interface in
32-bit mode
llvm-svn: 70009
2009-04-25 05:08:32 +00:00
Daniel Dunbar
449354c761
Add a test case for a somewhat obscure scenario.
...
llvm-svn: 69947
2009-04-24 02:38:10 +00:00
Daniel Dunbar
4645707034
Add implicit definition of objc_msgSend.
...
- As with malloc and friends, this is important where the return type
on a 64-bit platform would otherwise end up discarding the upper
32-bits.
llvm-svn: 69874
2009-04-23 07:00:09 +00:00
Daniel Dunbar
e4f25b706b
Reapply r69771, with updates & fixes:
...
Rework the shadow struct that is layed out for Objective-C classes.
- Superclasses are now always laid out in their shadow structure at
the first field.
- Prior to this, the entire class heirarchy was flattened into a
single structure which meant that alignment, padding, and bitfields
were incorrect (the ASTRecordLayout was correct however, which
meant our debug info didn't coincide with ivar offsets, for
example).
- This is still very suboptimal (for example, ivar are looked up
recursively, but I believe the ivar layout itself is now at least
close to correct.
- <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
backwards
llvm-svn: 69811
2009-04-22 17:43:55 +00:00
Daniel Dunbar
6067720a41
Make sure this test runs on all 3 Objective-C implementations.
...
llvm-svn: 69786
2009-04-22 07:28:06 +00:00
Daniel Dunbar
658ba85820
Revert r69771, I missed some (obvious) details. :/
...
llvm-svn: 69773
2009-04-22 04:39:47 +00:00
Daniel Dunbar
25b81ef847
Rework the shadow struct that is layed out for Objective-C classes.
...
- Superclasses are now always laid out their shadow structure at the
first field.
- Prior to this, the entire class heirarchy was flattened into a
single structure which meant that alignment, padding, and bitfields
weren't packed correctly (the ASTRecordLayout was correct however,
which meant our debug info didn't coincide with ivar offsets, for
example).
- This is still very suboptimal, but I believe the ivar layout itself
is now at least close to correct.
- <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
backwards
llvm-svn: 69771
2009-04-22 03:45:12 +00:00
Daniel Dunbar
50b5c4ccaa
Revert 69646, that was the precise inverse of what I wanted to commit.
...
llvm-svn: 69647
2009-04-21 01:19:10 +00:00
Daniel Dunbar
9df980b876
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: 69646
2009-04-21 01:18:01 +00:00
Mike Stump
3214d12325
Fixup codegen for write barriers for block variables. Radar 6786715
...
llvm-svn: 69642
2009-04-21 00:51:43 +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
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
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
f45dbd8c7b
Test case would allow clang to fail.
...
llvm-svn: 69470
2009-04-18 20:23:29 +00:00
Douglas Gregor
f21701b70c
Fix test to output LLVM to a temporary file, which we grep as part of the test
...
llvm-svn: 69448
2009-04-18 15:48:37 +00:00
Daniel Dunbar
41595d43d5
Use getAsPointerType instead of using getCanonicalType directly.
...
- <rdar://problem/6803995>
llvm-svn: 69435
2009-04-18 08:54:40 +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
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
Chris Lattner
ead1e0002f
clean up run lines.
...
llvm-svn: 69359
2009-04-17 17:43:56 +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
Eli Friedman
027aa3cb0e
Force target triple for test depending on __weak.
...
llvm-svn: 69297
2009-04-16 17:33:37 +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
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
Mike Stump
ca5ae66122
Fixup CodeGen for __weak __block variables. Radar 6756266
...
llvm-svn: 69010
2009-04-14 00:57:29 +00:00
Fariborz Jahanian
8e23171fbc
OS dependent code removed.
...
llvm-svn: 68904
2009-04-12 17:43:53 +00:00
Fariborz Jahanian
d381cde486
Non-pointer objects are none gc'able regardles of
...
the attribute set on them.
llvm-svn: 68844
2009-04-11 00:00:54 +00:00
Mike Stump
d352fd3699
Fixup copy/dispose helpers for Objective-C. Radar 6756504
...
llvm-svn: 68837
2009-04-10 23:09:55 +00:00
Daniel Dunbar
670af594d8
Force triple for a number of tests that rely on __weak.
...
llvm-svn: 68826
2009-04-10 21:23:20 +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
Anders Carlsson
39b2e130f0
Add @encode support for complex types.
...
llvm-svn: 68729
2009-04-09 21:55:45 +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
Chris Lattner
91c941ecfd
*everyone* knows that __weak is not defined on linux :)
...
llvm-svn: 68512
2009-04-07 06:05:28 +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
Daniel Dunbar
5718a2b4a1
Fix test (triple wasn't passed correctly, the driver doesn't accept
...
-mtriple).
llvm-svn: 68484
2009-04-07 02:31:44 +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
e4fd640147
Fix a bug in declaration of property in continuation
...
class which was exposed by implementation of
objc2's nonfragile abi code gen.
llvm-svn: 68259
2009-04-01 23:23:53 +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
Fariborz Jahanian
95c802cc03
Removed the test case, as Chris did have a test case in the patch.
...
llvm-svn: 68214
2009-04-01 16:53:37 +00:00
Fariborz Jahanian
df3a9f92b3
Test case for Chris's patch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=68177
llvm-svn: 68213
2009-04-01 16:51:23 +00:00
Eli Friedman
84ae509ac3
Fix test failure on Linux by forcing the triple to OS X.
...
llvm-svn: 68179
2009-04-01 02:55:21 +00:00
Chris Lattner
d18136a644
fix the two xfails I added with a previous patch by making ObjC interface
...
types get completed when their definition is seen if previously laid out by
the code generator.
llvm-svn: 68177
2009-04-01 02:36:43 +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
Chris Lattner
8b14b98bab
Fix a problem in ASTContext::addRecordToClass handling forward declarations.
...
In a case like:
@class foo;
foo *P;
addRecordToClass was making an empty shadow struct for the foo interface and
completing it. Later when an:
@interface foo
...
@endif
foo *Q;
was seen, ASTContext::addRecordToClass would think that foo was already laid
out and not lay out the definition. This fixes it to create a forward declared
struct the first time around, then complete it when the definition is seen.
Note that this causes two tests to regress, because something is trying to get
the size of the forward declared structs returned by this. Previously, this
would end up getting a size of zero but now it properly dies. I'm not sure
what the right solution is for this, so I xfailed the tests.
Fariborz, please take a look at this. The testcase in rdar://6676794 now gets
farther, but dies later because the objc ivar is not assigned a field number.
As an aside, I really don't like the fact that the objc front-end is creating
shadow C structs for ObjC types. This seems like an implementation detail of
the code generator that could be fixed by better factoring of the extant code.
llvm-svn: 68106
2009-03-31 09:24:30 +00:00
Mike Stump
871c1f6f88
Remove -f__block as codegen for __block variables should be solid.
...
llvm-svn: 67697
2009-03-25 18:05:39 +00:00
Daniel Dunbar
a45cf5b6b0
Rename clang to clang-cc.
...
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
2009-03-24 02:24:46 +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
Fariborz Jahanian
629aed9327
Issue error if variables are defined inside an objc class,
...
category or protocol.
llvm-svn: 67450
2009-03-21 18:06:45 +00:00
Mike Stump
692c6e3729
Fix codegen for support for super inside block literal expressions.
...
llvm-svn: 67406
2009-03-20 21:53:12 +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
Fariborz Jahanian
391d4fc7f7
More super dot-syntax property implementation
...
when there is actually a property declaration
used in the dot-syntax.
llvm-svn: 67391
2009-03-20 19:18:21 +00:00
Fariborz Jahanian
150abf2a00
Implement ir gen. for setter/getter applied to 'super'
...
in a property dot-syntax notation.
llvm-svn: 67382
2009-03-20 17:22:23 +00:00
Fariborz Jahanian
3654e65adf
objc: Implemented variables declared in class interface
...
whose sema decl is at the translation unit.
llvm-svn: 67249
2009-03-18 22:33:24 +00:00
Daniel Dunbar
94d48e0bd0
Force triple for a couple test cases.
...
llvm-svn: 66974
2009-03-13 22:48:51 +00:00
Chris Lattner
622b1041ca
add a testcase for recursion through blocks pointers, rdar://6676764.
...
llvm-svn: 66965
2009-03-13 22:00:25 +00:00
Fariborz Jahanian
54e6d924ff
Fix test.
...
llvm-svn: 66856
2009-03-13 00:43:34 +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
36ce7e17d7
Use paropery's setter attribute name as
...
the selector for the property setter.
llvm-svn: 66834
2009-03-12 22:34:11 +00:00
Fariborz Jahanian
156506e749
ir-gen support for class getter/setter call
...
using property dot-syntax.
llvm-svn: 66556
2009-03-10 18:03:11 +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
Chris Lattner
c0452e402b
add rdar#
...
llvm-svn: 66356
2009-03-08 01:43:34 +00:00
Chris Lattner
c808fc34b3
fix test
...
llvm-svn: 66352
2009-03-07 23:39:35 +00:00
Anders Carlsson
16d5d291ec
Mangle Objective-C interfaces correctly (where correctly refers to what gcc does)
...
llvm-svn: 66349
2009-03-07 22:03:21 +00:00
Eli Friedman
4663a3368d
Make constant emission for @encode use the common string emission code.
...
This is a bit cleaner, and also "fixes" bad code that compares the
addresses of the string constants.
llvm-svn: 66346
2009-03-07 20:17:55 +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
c61149d796
Fix to account for default support for blocks. Once we have enough
...
testing to to be sure it all works, we'll rip out all the unsupported
code.
llvm-svn: 66338
2009-03-07 15:34:10 +00:00
Fariborz Jahanian
f5d0613ce9
Fixed a bug where generation of read-barriers caused
...
crash in ir-gen.
llvm-svn: 66302
2009-03-06 23:05:56 +00:00
Mike Stump
4446dcf061
prep work for copy/destroy helpers for block literals.
...
llvm-svn: 66159
2009-03-05 08:32:30 +00:00
Fariborz Jahanian
eab5ecd8e0
Fixed an ir-gen bug in syntheszing a getter function
...
with property type which does not match its ivar and
in -fobjc-gc-only mode!
llvm-svn: 65955
2009-03-03 18:49:40 +00:00
Mike Stump
0e425b8200
Push checking down, also, give the user a hit as to which part of the
...
block literal is causing the problem, instead of the vague reference
to the entire block literal.
llvm-svn: 65798
2009-03-02 03:04:42 +00:00
Daniel Dunbar
53f12b11dc
This test requires blocks.
...
llvm-svn: 65754
2009-03-01 02:20:08 +00:00
Anders Carlsson
961763e35a
Emit errors about unsupported blocks features.
...
llvm-svn: 65751
2009-03-01 01:45:25 +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
Chris Lattner
d8b741c85f
handle @encode interactions with array initializers.
...
llvm-svn: 65401
2009-02-24 23:10:27 +00:00
Chris Lattner
0cb7803341
move some initialization checking code from SemaDecl.cpp
...
to SemaInit.cpp, no functionality change.
llvm-svn: 65394
2009-02-24 22:27:37 +00:00
Chris Lattner
d7e7b8e411
first wave of fixes for @encode sema support. This is part of PR3648.
...
The big difference here is that (like string literal) @encode has
array type, not pointer type.
llvm-svn: 65391
2009-02-24 22:18:39 +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
Anders Carlsson
d05f44b5ca
Correctly encode incomplete and variable length arrays. Fixes PR3639.
...
llvm-svn: 65255
2009-02-22 01:38:57 +00:00
Fariborz Jahanian
ccfd554024
Fixed an ICE in meta-data generation of __weak/__strong ivars.
...
llvm-svn: 65235
2009-02-21 18:23:24 +00:00
Fariborz Jahanian
1dd6094517
Fixes a bug in property type encoding.
...
llvm-svn: 64672
2009-02-16 21:41:04 +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
Fariborz Jahanian
d8fc1053ab
Fixed a 64bit code gen bug of a cateogory
...
implementation with no category declaration!
llvm-svn: 64470
2009-02-13 17:52:22 +00:00
Daniel Dunbar
eb39504426
Use -fnext-runtime for this test.
...
llvm-svn: 63688
2009-02-04 00:03:15 +00:00
Daniel Dunbar
c41a0b8a3c
Force -triple/-fnext-runtime for a few more test cases.
...
llvm-svn: 63679
2009-02-03 23:04:31 +00:00
Fariborz Jahanian
2f85a6450a
Detailed documentation for encoding of properties and a test
...
case.
llvm-svn: 62607
2009-01-20 20:04:12 +00:00
Fariborz Jahanian
218c630171
Improving on encoding of objective-c's property types. More to come.
...
llvm-svn: 62601
2009-01-20 19:14:18 +00:00
Fariborz Jahanian
705c6d9cdd
Patch to re-implement ivar-list meta-data generation to fix
...
cases of unnamed ivar bitfields.
llvm-svn: 62429
2009-01-17 19:36:33 +00:00
Douglas Gregor
088ea012cd
Add -fnext-runtime to Objective-C properties testcase
...
llvm-svn: 62390
2009-01-17 00:53:59 +00:00
Fariborz Jahanian
5c76772f49
Patch to fix encoding of Enum bitfields in ObjC.
...
llvm-svn: 62135
2009-01-13 01:18:13 +00:00
Fariborz Jahanian
30e7864661
Patch to implement code gen for aggrgate-valued property used
...
to access a field of its type.
llvm-svn: 62123
2009-01-12 23:27:26 +00:00
Fariborz Jahanian
17290c3638
Objc's compatibility-alias semantics and code
...
gen issue fix.
llvm-svn: 61901
2009-01-08 01:10:55 +00:00
Fariborz Jahanian
475831bd6e
Another nasty code gen. bug with trivial fix. Calling class
...
method on 'super' receiver in a category implementation.
Other simpler cases were working by accident.
llvm-svn: 61880
2009-01-07 20:11:22 +00:00
Sebastian Redl
4f84ddccc8
Fix a grep error that caused CodeGenObjC/encode-test.m to fail.
...
llvm-svn: 61455
2008-12-28 15:48:05 +00:00
Fariborz Jahanian
4ecf1e94db
Last patch, for now, to privde ObjC's encoding of types.
...
We now pass all gcc's encoding compatibility tests.
llvm-svn: 61387
2008-12-23 21:30:15 +00:00