llvm-project/clang/test/CodeGenObjC
John McCall bd30929e4d Validated by nightly-test runs on x86 and x86-64 darwin, including after
self-host.  Hopefully these results hold up on different platforms.  

I tried to keep the GNU ObjC runtime happy, but it's hard for me to test.
Reimplement how clang generates IR for exceptions.  Instead of creating new
invoke destinations which sequentially chain to the previous destination,
push a more semantic representation of *why* we need the cleanup/catch/filter
behavior, then collect that information into a single landing pad upon request.

Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional
control flow) are generated, since it's actually fairly closely tied in with
the former.  Remove the need to track which cleanup scope a block is associated
with.

Document a lot of previously poorly-understood (by me, at least) behavior.

The new framework implements the Horrible Hack (tm), which requires every
landing pad to have a catch-all so that inlining will work.  Clang no longer
requires the Horrible Hack just to make exceptions flow correctly within
a function, however.  The HH is an unfortunate requirement of LLVM's EH IR.

llvm-svn: 107631
2010-07-06 01:34:17 +00:00
..
2008-10-23-invalid-icmp.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
assign.m IRgen: Assignment to Objective-C properties shouldn't reload the value, for 2010-06-29 22:44:21 +00:00
atomic-aggregate-property.m More tests for ObjC++ GC support. 2010-05-19 23:07:54 +00:00
attr-strong.c Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
bitfield-1.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
bitfield-ivar-metadata.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
bitfield-ivar-offsets.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
bitfield_encoding.m Fixed Objective-C type encoding for bitfields for the GNU runtime to match the encoding used by GCC. 2010-06-04 01:10:52 +00:00
blocks-1.m More tests for ObjC++ GC support. 2010-05-19 23:07:54 +00:00
blocks-2.m More tests for ObjC++ GC support. 2010-05-19 23:07:54 +00:00
blocks-3.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
blocks-4.m Fix DeclContext of an objective-c @catch variable 2010-02-03 00:01:43 +00:00
blocks-5.m Fixed a block regression caused by trying to use 2010-06-07 19:39:39 +00:00
blocks-ivar-debug.m tests: Avoid spurious use of /dev/null. 2010-05-10 23:31:31 +00:00
blocks.m Fix testsuite for blocks mangling change 2010-05-25 17:46:21 +00:00
category-class.m Trying to make BuildBot happy again (related to PR7431). 2010-06-22 17:08:32 +00:00
category-super-class-meth.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
class-getter-dotsyntax.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
class-type.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
compatibility-alias.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
complex-property.m Fix a code gen. bug involving generation of getter method 2010-03-25 21:56:43 +00:00
constant-strings.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
continuation-class.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
deadcode_strip_used_var.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
debug-info-crash.m merge another one in. 2010-01-25 03:38:26 +00:00
debug-info-linkagename.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
default-property-synthesis.m Implement new default property synthesis rules. Essentially, no longer 2010-05-14 18:35:57 +00:00
dot-syntax-1.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
dot-syntax-2.m When using property-dot assignment syntax to call a setter method, 2010-06-07 22:02:01 +00:00
dot-syntax.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
encode-cstyle-method.m Implement method type encoding in the presense 2010-04-08 21:29:11 +00:00
encode-test-1.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
encode-test-2.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
encode-test-3.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
encode-test-4.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
encode-test-5.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
encode-test.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
exceptions.m Validated by nightly-test runs on x86 and x86-64 darwin, including after 2010-07-06 01:34:17 +00:00
for-in.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
forward-class-impl-metadata.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
hidden-visibility.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
hidden.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
id-isa-codegen.m Fix the test some more. 2010-03-09 22:17:52 +00:00
image-info.m IRgen/NeXT: Reuse EmitImageInfo for both fragile and non-fragile ABI. This fixes Clang to correctly emit the "CorrectedSynthesize" bit when using the non-fragile ABI. 2010-04-25 20:39:01 +00:00
implicit-objc_msgSend.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
implicit-property.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
interface-layout-64.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
interface.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
ivar-layout-64-bitfields.m More tests for ObjC++ GC support. 2010-05-19 23:07:54 +00:00
ivar-layout-64.m More tests for ObjC++ GC support. 2010-05-19 23:07:54 +00:00
ivar-layout-no-optimize.m More tests for ObjC++ GC support. 2010-05-19 23:07:54 +00:00
ivars.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
link-errors.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
message-arrays.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
messages-2.m Canonicalize parameter and return types before computing ABI info. Eliminates 2010-02-24 07:14:12 +00:00
messages.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
metadata-symbols-32.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
metadata-symbols-64.m NeXT: Clean up dispatch method policy selection. 2010-04-24 17:56:46 +00:00
metadata_symbols.m Fix tests that I missed from my previous commit. 2010-06-16 17:49:52 +00:00
missing-atend-metadata.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
nested-rethrow.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
newproperty-nested-synthesis-1.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
next-objc-dispatch.m NeXT: Clean up dispatch method policy selection. 2010-04-24 17:56:46 +00:00
no-category-class.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
non-lazy-classes.m tests: Force a triple. 2010-04-26 10:58:19 +00:00
ns-constant-strings.m Test case for NeXt's -fno-constant-cfstrings option. 2010-04-26 17:59:24 +00:00
objc-align.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
objc-assign-ivar.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
objc-gc-aggr-assign.m Changed test to use FileCheck. 2010-05-21 16:13:37 +00:00
objc-read-weak-byref.m Testcase fixes to reflect instruction table changes in the LLVM backend 2009-12-18 00:04:09 +00:00
objc2-assign-global.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
objc2-ivar-assign.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
objc2-legacy-dispatch.m NeXT: Clean up dispatch method policy selection. 2010-04-24 17:56:46 +00:00
objc2-new-gc-api-strongcast.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-no-strong-cast.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
objc2-no-write-barrier.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-nonfragile-abi-impl.m Test for my last patch. 2010-03-22 18:27:27 +00:00
objc2-property-encode.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
objc2-protocol-enc.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
objc2-retain-codegen.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-strong-cast-1.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-strong-cast.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-weak-assign.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-weak-block-call.m Generate the objc_read_weak API when calling 2010-02-10 23:34:57 +00:00
objc2-weak-compare.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-weak-import-attribute.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
objc2-weak-ivar-debug.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-weak-ivar.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-write-barrier-2.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-write-barrier-3.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-write-barrier-4.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-write-barrier-5.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
objc2-write-barrier.m More Objective-C++ GC tests. 2010-05-20 18:22:28 +00:00
object-incr-decr-1.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
overloadable.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
predefined-expr.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
property-aggr-type.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
property-agrr-getter.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
property-category-impl.m Fixes a problem in generation of meta-data for 2010-06-22 16:33:55 +00:00
property-complex.m Fix test. 2010-05-11 18:48:13 +00:00
property-dbg.m Emit debug info for objc getters and setters. 2010-04-05 21:09:15 +00:00
property-getter-dot-syntax.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
property-incr-decr-1.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
property-list-in-class.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
property-setter-attr.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
property.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
protocol-in-extended-class.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
protocol-property-synth.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
protocols-lazy.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
protocols.m Correctly generate IR for ObjC messages sends to protocol-qualified types. 2010-05-17 20:12:43 +00:00
runtime-fns.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
sel-as-builtin-type.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
stand-alone-implementation.m Patch removes IVars list from ObjCInterfaceDecl and 2010-02-19 00:31:17 +00:00
super-classmethod-category.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
super-dotsyntax-property.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
super-message-fragileabi.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
synchronized.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
synthesize_ivar-cont-class.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
synthesize_ivar.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
try.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
undefined-protocol.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
unname-bf-metadata.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
unwind-fn.m Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes 2010-02-10 18:49:11 +00:00
variadic-sends.m Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
x86_64-struct-return-gc.m don't slap noalias attribute on stret result arguments. 2010-04-20 05:44:43 +00:00