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