summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-06 22:46:58 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-06 22:46:58 +0000
commit5bceb3cd153fc162dbbcdd02e3ad539f895d09bd (patch)
tree059bb43db4c6e79cbfc2b53aad3fae44ac932bdd /gcc/testsuite/obj-c++.dg
parentd0b0b694d2623227bb3a1524962b46010c713c16 (diff)
downloadgcc-5bceb3cd153fc162dbbcdd02e3ad539f895d09bd.tar.gz
In gcc/testsuite/:
2011-06-06 Nicola Pero <nicola.pero@meta-innovation.com> Updated all testcases in the ObjC/ObjC++ testsuites to use the Modern Objective-C runtime API. * objc/execute/next_mapping.h: Removed. * objc-obj-c++-shared/next-mapping.h: Removed. * objc-obj-c++-shared/Object1.h: Removed. * objc-obj-c++-shared/Object1.m: Removed. * objc-obj-c++-shared/Object1.mm: Removed. * objc-obj-c++-shared/Object1-implementation.h: Removed. * objc-obj-c++-shared/Protocol1.h: Removed. * objc-obj-c++-shared/objc-test-suite-types.h: Removed definition of ProtoBool, IVAR_T and METHOD. * objc-obj-c++-shared/runtime.h: New. * objc-obj-c++-shared/TestsuiteObject.h: New. * objc-obj-c++-shared/TestsuiteObject.m: New. * objc/compile/trivial.m: Use TestsuiteObject instead of Object. * objc/execute/IMP.m: Include ../../objc-obj-c++-shared/runtime.h. Use the Modern Objective-C runtime API. ([TestClass -next:]): Made it a class method. * objc/execute/_cmd.m: Include ../../objc-obj-c++-shared/runtime.h. Use the Modern Objective-C runtime API. ([TestClass +initialize]): Include this method also with the GNU runtime. * objc/execute/accessing_ivars.m: Use TestsuiteObject instead of Object. ([-setValue:]): Return void. * objc/execute/bf-common.h: Do not include objc/objc-encoding.h with the GNU runtime. Include ../../objc-obj-c++-shared/runtime.h. Do not define objc_get_class for the NeXT runtime. Use the existing print_ivars() and compare_structures() implementations for the old NeXT runtime. Added new implementations for the Modern GNU and NeXT runtimes. Enable the testcase (and hence all the bf-* ones) for __OBJC2__ as well. (main): Use objc_getClass(). Use return instead of exit. * objc/execute/bycopy-1.m: Include objc/objc.h instead of ../../objc-obj-c++-shared/Protocol1.h. (main): Use return instead of exit(). * objc/execute/bycopy-2.m: Include objc/objc.h instead of ../../objc-obj-c++-shared/Protocol1.h. Use TestsuiteObject instead of Object. (main): Use return instead of exit(). * objc/execute/bycopy-3.m: Updated includes. Use TestsuiteObject instead of Object. Removed prototype for exit(). (main): Use return instead of exit(). Use the Modern Objective-C runtime API. * objc/execute/cascading-1.m: Use TestsuiteObject instead of Object. * objc/execute/class-tests-1.h: Include ../../objc-obj-c++-shared/runtime.h. Use the Modern Objective-C runtime API. (test_class_with_superclass): Do not call [Object class]. There is no need to with the current libobjc. * objc/execute/class-tests-2.h: Include ../../objc-obj-c++-shared/runtime.h. Use the Modern Objective-C runtime API. * objc/execute/class-1.m: Do not include <objc/objc-api.h> and ../../objc-obj-c++-shared/next-mapping.h. * objc/execute/class-2.m: Likewise. * objc/execute/class-3.m: Likewise. * objc/execute/class-4.m: Do not include <objc/objc-api.h> and ../../objc-obj-c++-shared/next-mapping.h. ([RootClass +initialize]): Include this method also with the GNU runtime. (main): Use the Modern Objective-C runtime API. * objc/execute/class-5.m: Likewise. * objc/execute/class-6.m: Likewise. * objc/execute/class-7.m: Likewise. * objc/execute/class-8.m: Likewise. * objc/execute/class-9.m: Likewise. * objc/execute/class-10.m: Likewise. * objc/execute/class-11.m: Likewise. * objc/execute/class-12.m: Likewise. * objc/execute/class-13.m: Likewise. * objc/execute/class-14.m: Likewise. * objc/execute/class_self-1.m ([TestClass +initialize]): Include this method also with the GNU runtime. * objc/execute/class_self-2.m: ([TestClass +initialize], [ClassA +initialize]): Include this method also with the GNU runtime. * objc/execute/compatibility_alias.m: Use TestsuiteObject instead of Object. * objc/execute/encode-1.m: Likewise. * objc/execute/enumeration-1.m: Likewise. * objc/execute/enumeration-2.m: Likewise. * objc/execute/exceptions/catchall-1.m: Likewise. * objc/execute/exceptions/finally-1.m: Likewise. * objc/execute/exceptions/foward-1.m: Likewise. * objc/execute/exceptions/local-variables-1.m: Likewise. * objc/execute/exceptions/throw-nil.m: Likewise. * objc/execute/exceptions/trivial.m: Likewise. * objc/execute/exceptions/handler-1.m: Use TestsuiteObject instead of Object. Include objc/runtime.h instead of objc/objc-api.h. * objc/execute/exceptions/matcher-1.m: Likewise. * objc/execute/formal_protocol-1.m: Use TestsuiteObject instead of Object. * objc/execute/formal_protocol-2.m: Likewise. * objc/execute/formal_protocol-3.m: Likewise. * objc/execute/formal_protocol-4.m: Likewise. * objc/execute/formal_protocol-5.m: Include ../../objc-obj-c++-shared/runtime.h. (main): Always use protocol_getName(). * objc/execute/formal_protocol-6.m: Likewise. * objc/execute/formal_protocol-7.m: Use TestsuiteObject instead of Object. Include <objc/Protocol.h> instead of ../../objc-obj-c++-shared/Protocol1.h. * objc/execute/function-message-1.m: Use TestsuiteObject intead of Object. * objc/execute/informal_protocol.m: Likewise. * objc/execute/load-3.m: Likewise. * objc/execute/many_args_method.m ([TestClass +initialize]): Include this method with the GNU runtime as well. * objc/execute/nested-3.m ([Test +initialize]): Likewise. * objc/execute/nested-func-1.m: Use TestsuiteObject instead of Object. * objc/execute/nil_method-1.m: Likewise. * objc/execute/no_clash.m: Likewise. * objc/execute/np-1.m: Do not include ../../objc-obj-c++-shared/Protocol1.h. (main): Use return instead of exit(). * objc/execute/np-2.m: Do not include ../../objc-obj-c++-shared/Protocol1.h. ([MyObject +initialize]): Include this method also with the GNU runtime. (main): Use return instead of exit(). * objc/execute/object_is_class.m: Include ../../objc-obj-c++-shared/runtime.h. Use TestsuiteObject instead of Object. (main): Use the Modern Objective-C runtime API. * objc/execute/object_is_meta_class.m: Likewise. * objc/execute/private.m: Use TestsuiteObject instead of Object. * objc/execute/protocol-isEqual-1.m: Include objc/Protocol.h instead of ../objc-obj-c++-shared/Protocol1.h. Include ../../objc-obj-c++-shared/runtime.h. (main): Use the Modern Objective-C runtime API. * objc/execute/protocol-isEqual-2.m: Likewise. * objc/execute/protocol-isEqual-3.m: Likewise. * objc/execute/protocol-isEqual-4.m: Likewise. * objc/execute/redefining_self.m ([TestClass +initialize]): Include this method with the GNU runtime as well. * objc/execute/root_methods.m: Include ../../objc-obj-c++-shared/runtime.h. ([RootClass +initialize]): Include this method with the GNU runtime as well. (main): Use the Modern Objective-C runtime API. * objc/execute/selector-1.m: Include ../../objc-obj-c++-shared/runtime.h. Use TestsuiteObject instead of Object. (main): Use the Modern Objective-C runtime API. * objc/execute/static-1.m ([Test +initialize]): Include this method with the GNU runtime as well. * objc/execute/static-2.m: Likewise. * objc/execute/trivial.m: Use TestsuiteObject instead of Object. * objc/execute/va_method.m: Do not include objc/objc-api.h. ([MathClass +initialize]): Include this method with the GNU runtime as well. * objc.dg/attributes/categ-attribute-1.m: Use TestsuiteObject instead of Object. * obj-c++.dg/attributes/categ-attribute-1.mm: Likewise. * objc.dg/attributes/categ-attributes-2.m: Likewise. * obj-c++.dg/attributes/categ-attributes-2.mm: Likewise. * objc.dg/attributes/method-attribute-1.m: Likewise. * obj-c++.dg/attributes/method-attribute-1.mm: Likewise. * objc.dg/attributes/method-attribute-2.m: Likewise. * obj-c++.dg/attributes/method-attribute-2.mm: Likewise. * objc.dg/attributes/method-attribute-3.m: Likewise. * obj-c++.dg/attributes/method-attribute-3.mm: Likewise. * obj-c++.dg/basic.mm: Use TestsuiteObject instead of Object. * objc.dg/bitfield-1.m: Use TestsuiteObject instead of Object. * obj-c++.dg/bitfield-1.mm: Likewise. * obj-c++.dg/bitfield-2.mm: Likewise * objc.dg/bitfield-3.m: Likewise. * obj-c++.dg/bitfield-4.mm: Likewise. * objc.dg/bitfield-5.m: Likewise * objc.dg/call-super-1.m: Likewise. * objc.dg/call-super-2.m: Use TestsuiteObject instead of Object. Use objc_getClass() instead of objc_get_class(), but for the GNU runtime redefine objc_getClass as objc_get_class. Include ../objc-obj-c++-shared/runtime.h. * objc.dg/call-super-3.m: Use TestsuiteObject instead of Object. * objc.dg/category-1.m: Use TestsuiteObject instead of Object. Use the Modern Objective-C runtime API. * objc.dg/class-protocol-1.m: Include ../objc-obj-c++-shared/runtime.h instead of objc/objc-api.h. * obj-c++.dg/class-protocol-1.mm: Likewise. * objc.dg/comp-types-8.m: Use TestsuiteObject instead of Object. * objc.dg/comp-types-10.m: Likewise. * objc.dg/comp-types-11.m: Likewise. * objc.dg/comp-types-12.m: Likewise. * obj-c++.dg/comp-types-9.mm: Likewise. * obj-c++.dg/comp-types-11.mm: Likewise. * obj-c++.dg/comp-types-12.mm: Likewise. * obj-c++.dg/comp-types-13.mm: Likewise. * obj-c++.dg/cxx-ivars-1.mm: Likewise. * obj-c++.dg/cxx-ivars-2.mm: Likewise. * obj-c++.dg/cxx-scope-1.mm: Likewise. * obj-c++.dg/cxx-scope-2.mm: Likewise. * objc.dg/defs.m: Use TestsuiteObject instead of Object. * objc.dg/desig-init-1.m: Likewise. * obj-c++.dg/defs.mm: Likewise. * objc.dg/exceptions-2.m: Likewise. * obj-c++.dg/except-1.mm: Likewise. * obj-c++.dg/exceptions-2.mm: Likewise. * objc.dg/encode-2.m: Use TestsuiteObject instead of Object. Use the Modern Objective-C runtime API. * objc.dg/encode-3.m: Use TestsuiteObject instead of Object. Use the Modern Objective-C runtime API. Do not include ../objc-obj-c++-shared/objc-test-suite-types.h. Define ProtoBool. * objc.dg/encode-4.m: Use TestsuiteObject instead of Object. Use the Modern Objective-C runtime API except when using an older NeXT runtime. * objc.dg/encode-5.m: Use TestsuiteObject instead of Object. Use the Modern Objective-C runtime API. * objc.dg/encode-7.m: Include objc/runtime.h instead of objc/encoding.h. * objc.dg/encode-7-next.m: Use TestsuiteObject instead of Object. * objc.dg/encode-7-next-64bit.m: Updated include. * objc.dg/encode-8.m: Include objc/runtime.h instead of objc/encoding.h. * obj-c++.dg/encode-4.mm: Use TestsuiteObject instead of Object. Use the Modern Objective-C runtime API. * obj-c++.dg/encode-5.mm: Use TestsuiteObject instead of Object. Use the Modern Objective-C runtime API. Include objc/Protocol.h instead of ../objc-obj-c++-shared/Protocol1.h. * obj-c++.dg/encode-6.mm: Use TestsuiteObject instead of Object. Use the Modern Objective-C runtime API except when using an older NeXT runtime. * obj-c++.dg/encode-7.mm: Use TestsuiteObject instead of Object. Use the Modern Objective-C runtime API. * objc.dg/fix-and-continue-1.m: Use TestsuiteObject instead of Object. * obj-c++.dg/fix-and-continue-2.mm: Likewise. * objc.dg/fix-and-continue-2.m: Likewise. * objc.dg/foreach-1.m: Likewise. * objc.dg/foreach-2.m: Likewise. * objc.dg/foreach-3.m: Likewise. * objc.dg/foreach-4.m: Likewise. * objc.dg/foreach-5.m: Likewise. * objc.dg/foreach-6.m: Likewise. * objc.dg/foreach-7.m: Likewise. * objc.dg/func-ptr-1.m: Use TestsuiteObject instead of Object. * objc.dg/func-ptr-2.m: Likewise. * objc.dg/fsf-package-0.m: Use TestsuiteObject instead of Object. Do not include objc/objc-api.h. * obj-c++.dg/fsf-package-0.mm: Likewise. * objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c (switchfiles): Include objc/runtime.h instead of objc/encoding.h. * objc.dg/gnu-runtime-1.m: Updated to use TestsuiteObject instead of Object. * obj-c++.dg/gnu-runtime-1.mm: Likewise. * objc.dg/gnu-runtime-3.m: Likewise. * obj-c++.dg/gnu-runtime-3.mm: Likewise. * objc.dg/headers.m: Include objc/runtime.h instead of objc/encoding.h for the GNU runtime. Include objc/objc-api.h only for the NeXT runtime. * objc.dg/isa-field-1.m: Use TestsuiteObject instead of Object. * obj-c++.dg/isa-field-1.mm: Likewise. * obj-c++.dg/ivar-list-semi.mm: Likewise. * objc.dg/layout-1.m: Likewise. * objc.dg/layout-2.m: Likewise. * objc.dg/local-decl-2.m: Likewise. * objc.dg/lookup-1.m: Use TestsuiteObject instead of Object. ([Container +elementForView:]): Use class_conformsToProtocol(). * obj-c++.dg/lookup-2.mm: Likewise. * obj-c++.dg/layout-1.mm: Use TestsuiteObject instead of Object. * obj-c++.dg/local-decl-1.mm: Likewise. * objc.dg/method-3.m: Likewise. * objc.dg/method-4.m: Likewise. * objc.dg/method-6.m: Include objc/Protocol.h instead of ../objc-obj-c++-shared/Protocol1.h. * objc.dg/method-7.m: Use TestsuiteObject instead of Object. * objc.dg/method-9.m: Likewise. * objc.dg/method-10.m: Likewise. * objc.dg/method-13.m ([Root +initialize]): Include this method also for the GNU runtime. (main): Use objc_getClass() also for the GNU runtime. * objc.dg/method-15.m: Use TestsuiteObject instead of Object. * objc.dg/method-17.m: Likewise. * objc.dg/method-19.m: Likewise. * objc.dg/method-20b.m: Likewise. * obj-c++.dg/method-2.mm: Likewise. * obj-c++.dg/method-6.mm: Likewise. * obj-c++.dg/method-10.mm: Likewise. * obj-c++.dg/method-11.mm: Likewise. * obj-c++.dg/method-12.mm: Include objc/Protocol.h instead of ../objc-obj-c++-shared/Protocol1.h. * obj-c++.dg/method-13.mm: Use TestsuiteObject instead of Object. * obj-c++.dg/method-15.mm: Likewise. * obj-c++.dg/method-17.mm: Likewise. * obj-c++.dg/method-19.mm: Updated includes. ([Root +initialize]): Include this method also for the GNU runtime. (main): Use objc_getClass() also for the GNU runtime. * obj-c++.dg/method-21.mm: Use TestsuiteObject instead of Object. * obj-c++.dg/method-22.mm: Likewise. * obj-c++.dg/method-23.mm: Likewise. * obj-c++.dg/no-extra-load.mm: Likewise. * objc.dg/objc-fast-4.m: Likewise. * objc.dg/objc-gc-4.m: Likewise. * obj-c++.dg/objc-gc-3.mm: Likewise. * objc.dg/pr18255.m: Include objc/runtime.h. (main): Use protocol_getMethodDescription() instead of [Protocol -descriptionForInstanceMethod]. * objc.dg/pr23214.m ([Object(TS_CAT) -class]): Renamed to test. Made it available with all runtimes. (main): Call -test instead of -class. * objc.dg/pr45878.m ([Object -isEqual:]): Renamed to testIsEqual, and put into a category. * objc.dg/proto-lossage-2.m: Use TestsuiteObject instead of Object. Include objc/objc.h. * obj-c++.dg/proto-lossage-2.mm: Likewise. * objc.dg/proto-lossage-3.m: Updated includes. (MyClass): New. (main): Use protocol_getMethodDescription() instead of [Protocol -descriptionForInstanceMethod] and [Protocol -descriptionForClassMethod]. * obj-c++.dg/proto-lossage-3.mm: Likewise. * objc.dg/proto-qual-1.m: Updated includes. Use the Modern Objective-C runtime API. * obj-c++.dg/proto-qual-1.mm: Likewise. * objc.dg/property/property-1.m: Use TestsuiteObject instead of Object. * obj-c++.dg/property/property-1.mm: Likewise. * obj-c++.dg/qual-types-1.mm: Likewise. * objc.dg/selector-2.m: Include objc/objc.h instead of ../objc-obj-c++-shared/Object1.h. * obj-c++.dg/selector-2.mm: Likewise. * obj-c++.dg/selector-5.mm: Likewise. * obj-c++.dg/selector-6.mm: Likewise. * objc.dg/set-not-used-1.m: Use TestsuiteObject instead of Object. Do not include objc/objc-api.h. * obj-c++.dg/set-not-used-1.mm: Likewise. * objc.dg/sizeof-1.m: Use TestsuiteObject instead of Object. * objc.dg/stret-1.m: Likewise. * objc.dg/stret-2.m: Likewise. * obj-c++.dg/super-class-2.mm: Likewise. * objc.dg/super-class-3.m: Likewise. * objc.dg/super-class-4.m: Likewise. * objc.dg/sync-2.m: Likewise. * obj-c++.dg/sync-2.mm: Likewise. * objc.dg/sync-1.m: Include objc/objc.h instead of ../objc-obj-c++-shared/Object1.h. * objc.dg/special/unclaimed-category-1.h (TestClass): Always use 'Class' as the type of 'isa'. * objc.dg/special/unclaimed-category-1.m: Use the Modern Objective-C runtime API. ([TestClass +initialize]): Include this method with the GNU runtime as well. * objc.dg/strings/strings-1.m: Updated includes. * obj-c++.dg/strings/strings-1.mm: Likewise. * obj-c++.dg/strings/const-str-12.mm: Updated to be identical to objc.dg/strings/const-str-12b.m. * obj-c++.dg/template-1.mm: Use TestsuiteObject intead of Object. * obj-c++.dg/template-3.mm: Likewise. * obj-c++.dg/template-4.mm: Likewise. * objc.dg/threedotthree-abi-1.m: Updated includes. Use Modern Objective-C runtime API. * obj-c++.dg/threedotthree-abi-1.mm: Likewise. * objc.dg/try-catch-1.m: Use TestsuiteObject instead of Object. * obj-c++.dg/try-catch-1.mm: Likewise. * obj-c++.dg/try-catch-2.mm: Likewise. * objc.dg/try-catch-3.m: Likewise. * obj-c++.dg/try-catch-3.mm: Likewise. * objc.dg/try-catch-6.m: Likewise. * objc.dg/try-catch-7.m: Likewise. * obj-c++.dg/try-catch-7.mm: Likewise. * obj-c++.dg/try-catch-8.mm: Likewise. * obj-c++.dg/try-catch-9.mm: Likewise. * objc.dg/try-catch-10.m: Likewise. * obj-c++.dg/try-catch-11.mm: Likewise. * objc.dg/typedef-alias-1.m: Use TestsuiteObject instead of Object. Include objc/objc.h. * obj-c++.dg/typedef-alias-1.mm: Likewise. * objc.dg/type-size-2.m: Use the Modern Objective-C runtime API. * objc.dg/torture/forward-1.m: Use TestsuiteObject intead of Object. Use Modern Objective-C runtime API. Do not use performv::. * objc.dg/torture/trivial.m: Use TestsuiteObject intead of Object. * obj-c++.dg/torture/trivial.mm: Likewise. * objc.dg/torture/strings/const-str-10.m: Include objc/Object.h instead of ../objc-obj-c++-shared/Object1.h. Include ../objc-obj-c++-shared/runtime.h. * obj-c++.dg/torture/strings/const-str-10.mm: Likewise. * objc.dg/torture/strings/const-str-11.m: Likewise. * obj-c++.dg/torture/strings/const-str-11.mm: Likewise. * objc.dg/torture/strings/const-str-9.m: Likewise. * obj-c++.dg/torture/strings/const-str-9.mm: Likewise. * objc.dg/torture/strings/const-str-7.m: Use TestsuiteObject instead of Object. Only add _FooClassReference if __NEXT_RUNTIME__. * obj-c++.dg/torture/strings/const-str-7.mm: Likewise. * objc.dg/torture/strings/const-str-8.m: Likewise. * obj-c++.dg/torture/strings/const-str-8.mm: Likewise. * obj-c++.dg/torture/strings/string1.mm: Updated includes and additional sources. * objc.dg/torture/tls/thr-init-3.m: Use TestsuiteObject instead of Object. * obj-c++.dg/torture/tls/thr-init-3.mm: Likewise. * objc.dg/va-meth-1.m: Use TestsuiteObject instead of Object. * obj-c++.dg/va-meth-1.mm: Likewise. * objc.dg/zero-link-1.m: Include objc/Object.h instead of ../objc-obj-c++-shared/Object1.h. * objc.dg/zero-link-3.m: Likewise. 2011-06-06 Nicola Pero <nicola.pero@meta-innovation.com> * obj-c++.dg/try-catch-2.mm: Fixed unterminated comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174727 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/obj-c++.dg')
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/categ-attribute-1.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/method-attribute-1.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/method-attribute-2.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/basic.mm23
-rw-r--r--gcc/testsuite/obj-c++.dg/bitfield-1.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/bitfield-2.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/bitfield-4.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/class-protocol-1.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-11.mm10
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-12.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-13.mm8
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-9.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/cxx-ivars-1.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/cxx-ivars-2.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/cxx-scope-1.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/cxx-scope-2.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/defs.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/encode-4.mm28
-rw-r--r--gcc/testsuite/obj-c++.dg/encode-5.mm45
-rw-r--r--gcc/testsuite/obj-c++.dg/encode-6.mm37
-rw-r--r--gcc/testsuite/obj-c++.dg/encode-7.mm26
-rw-r--r--gcc/testsuite/obj-c++.dg/except-1.mm5
-rw-r--r--gcc/testsuite/obj-c++.dg/exceptions-2.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/fix-and-continue-2.mm12
-rw-r--r--gcc/testsuite/obj-c++.dg/fsf-package-0.m5
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-runtime-1.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-runtime-3.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/isa-field-1.mm55
-rw-r--r--gcc/testsuite/obj-c++.dg/ivar-list-semi.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/layout-1.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/local-decl-1.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/lookup-2.mm10
-rw-r--r--gcc/testsuite/obj-c++.dg/method-10.mm8
-rw-r--r--gcc/testsuite/obj-c++.dg/method-11.mm8
-rw-r--r--gcc/testsuite/obj-c++.dg/method-12.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/method-13.mm12
-rw-r--r--gcc/testsuite/obj-c++.dg/method-15.mm10
-rw-r--r--gcc/testsuite/obj-c++.dg/method-17.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/method-19.mm12
-rw-r--r--gcc/testsuite/obj-c++.dg/method-2.mm9
-rw-r--r--gcc/testsuite/obj-c++.dg/method-21.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/method-22.mm5
-rw-r--r--gcc/testsuite/obj-c++.dg/method-23.mm5
-rw-r--r--gcc/testsuite/obj-c++.dg/method-6.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/no-extra-load.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/objc-gc-3.mm7
-rw-r--r--gcc/testsuite/obj-c++.dg/property/property-1.mm5
-rw-r--r--gcc/testsuite/obj-c++.dg/proto-lossage-2.mm5
-rw-r--r--gcc/testsuite/obj-c++.dg/proto-lossage-3.mm23
-rw-r--r--gcc/testsuite/obj-c++.dg/proto-qual-1.mm27
-rw-r--r--gcc/testsuite/obj-c++.dg/qual-types-1.mm8
-rw-r--r--gcc/testsuite/obj-c++.dg/selector-2.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/selector-5.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/selector-6.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/set-not-used-1.mm7
-rw-r--r--gcc/testsuite/obj-c++.dg/strings/const-str-12.mm9
-rw-r--r--gcc/testsuite/obj-c++.dg/strings/strings-1.mm5
-rw-r--r--gcc/testsuite/obj-c++.dg/super-class-2.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/sync-2.mm8
-rw-r--r--gcc/testsuite/obj-c++.dg/template-1.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/template-3.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/template-4.mm10
-rw-r--r--gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm25
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm3
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm3
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/const-str-7.mm9
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/const-str-8.mm9
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm3
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/string1.mm5
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/tls/thr-init-3.mm5
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/trivial.mm5
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-1.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-11.mm8
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-2.mm16
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-3.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-7.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-8.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-9.mm10
-rw-r--r--gcc/testsuite/obj-c++.dg/typedef-alias-1.mm9
-rw-r--r--gcc/testsuite/obj-c++.dg/va-meth-1.mm6
82 files changed, 343 insertions, 384 deletions
diff --git a/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-1.mm b/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-1.mm
index 6c48e0ad1bc..63d837fb6bc 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-1.mm
@@ -1,9 +1,9 @@
/* { dg-do compile } */
#include <objc/objc.h>
-#include "../../objc-obj-c++-shared/Object1.h"
+#include "../../objc-obj-c++-shared/TestsuiteObject.h"
-@interface obj : Object {
+@interface obj : TestsuiteObject {
@public
int var;
}
diff --git a/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm b/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm
index d2fb7891384..934279ecafd 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm
@@ -1,9 +1,9 @@
/* { dg-do compile } */
#include <objc/objc.h>
-#include "../../objc-obj-c++-shared/Object1.h"
+#include "../../objc-obj-c++-shared/TestsuiteObject.h"
-@interface obj : Object {
+@interface obj : TestsuiteObject {
@public
int var;
}
diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-attribute-1.mm b/gcc/testsuite/obj-c++.dg/attributes/method-attribute-1.mm
index 747deab0d2c..60d7822f09b 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/method-attribute-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/method-attribute-1.mm
@@ -1,9 +1,9 @@
/* { dg-do compile } */
#include <objc/objc.h>
-#include "../../objc-obj-c++-shared/Object1.h"
+#include "../../objc-obj-c++-shared/TestsuiteObject.h"
-@interface obj : Object {
+@interface obj : TestsuiteObject {
@public
int var;
}
diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-attribute-2.mm b/gcc/testsuite/obj-c++.dg/attributes/method-attribute-2.mm
index 4a56b3aa8f6..90369cc66c0 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/method-attribute-2.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/method-attribute-2.mm
@@ -1,9 +1,9 @@
/* { dg-do compile } */
#include <objc/objc.h>
-#include "../../objc-obj-c++-shared/Object1.h"
+#include "../../objc-obj-c++-shared/TestsuiteObject.h"
-@interface obj : Object {
+@interface obj : TestsuiteObject {
@public
int var;
}
diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm b/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm
index bab40d342ee..3993c5f1765 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm
@@ -1,8 +1,8 @@
/* { dg-do compile } */
-#include "../../objc-obj-c++-shared/Object1.h"
+#include "../../objc-obj-c++-shared/TestsuiteObject.h"
-@interface obj : Object {
+@interface obj : TestsuiteObject {
@public
int var;
}
diff --git a/gcc/testsuite/obj-c++.dg/basic.mm b/gcc/testsuite/obj-c++.dg/basic.mm
index bd593c13b5e..668be27308d 100644
--- a/gcc/testsuite/obj-c++.dg/basic.mm
+++ b/gcc/testsuite/obj-c++.dg/basic.mm
@@ -2,27 +2,10 @@
// { dg-do run }
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-//#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <iostream>
-#include <objc/Object.h>
-
-#ifdef __OBJC2__
-@interface Object (ADDITIONS)
-+ initialize;
-- init;
-+ alloc;
-+ new;
-@end
-@implementation Object (ADDITIONS)
-+ initialize { return self; }
-- init { return self; }
-+ alloc { return class_createInstance (self, 0); }
-+ new { return [[self alloc] init]; }
-@end
-#endif
-
-@interface Greeter : Object
+@interface Greeter : TestsuiteObject
- (void) greet: (const char *)msg;
@end
@@ -38,4 +21,4 @@ main ()
Greeter *obj = [Greeter new];
[obj greet: "Hello from Objective-C++"];
}
-//#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/bitfield-1.mm b/gcc/testsuite/obj-c++.dg/bitfield-1.mm
index 7b8e861ca66..92aaae4cfda 100644
--- a/gcc/testsuite/obj-c++.dg/bitfield-1.mm
+++ b/gcc/testsuite/obj-c++.dg/bitfield-1.mm
@@ -9,7 +9,7 @@
/* Leave blank lines here to keep warnings on the same lines. */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <objc/objc.h>
#include <stdlib.h>
@@ -17,7 +17,7 @@
enum Enum { zero, one, two, three, four };
-@interface Base: Object {
+@interface Base: TestsuiteObject {
@public
unsigned a: 2;
int b: 3;
diff --git a/gcc/testsuite/obj-c++.dg/bitfield-2.mm b/gcc/testsuite/obj-c++.dg/bitfield-2.mm
index f384f24dd5a..e88811ee5b7 100644
--- a/gcc/testsuite/obj-c++.dg/bitfield-2.mm
+++ b/gcc/testsuite/obj-c++.dg/bitfield-2.mm
@@ -4,12 +4,12 @@
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#define CHECK_IF(expr) if(!(expr)) abort();
-@interface Base: Object
+@interface Base: TestsuiteObject
{
int full;
int full2: 32;
@@ -77,4 +77,4 @@ int main(void) {
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/bitfield-4.mm b/gcc/testsuite/obj-c++.dg/bitfield-4.mm
index 35c32ee98a4..9ffa398989c 100644
--- a/gcc/testsuite/obj-c++.dg/bitfield-4.mm
+++ b/gcc/testsuite/obj-c++.dg/bitfield-4.mm
@@ -4,7 +4,7 @@
/* { dg-do run } */
/* { dg-options "-Wpadded" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#include <string.h>
@@ -13,7 +13,7 @@
enum Enum { one, two, three, four };
-@interface Base: Object {
+@interface Base: TestsuiteObject {
unsigned a: 2;
int b: 3;
enum Enum c: 4;
diff --git a/gcc/testsuite/obj-c++.dg/class-protocol-1.mm b/gcc/testsuite/obj-c++.dg/class-protocol-1.mm
index 2ab702a4dfb..9e68c2ba6e5 100644
--- a/gcc/testsuite/obj-c++.dg/class-protocol-1.mm
+++ b/gcc/testsuite/obj-c++.dg/class-protocol-1.mm
@@ -3,7 +3,7 @@
/* { dg-do compile } */
#include <objc/objc.h>
-#include <objc/objc-api.h>
+#include "../objc-obj-c++-shared/runtime.h"
@protocol MyProto1
+(void)doItClass1;
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-11.mm b/gcc/testsuite/obj-c++.dg/comp-types-11.mm
index 3d85983991e..b95af5de1bc 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-11.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-11.mm
@@ -1,22 +1,22 @@
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
@protocol Foo
- (id)meth1;
- (id)meth2:(int)arg;
@end
-@interface Derived1: Object
+@interface Derived1: TestsuiteObject
@end
-@interface Derived2: Object
+@interface Derived2: TestsuiteObject
+ (Derived1 *)new;
@end
id<Foo> func(void) {
- Object *o = [Object new];
- return o; /* { dg-warning "class .Object. does not implement the .Foo. protocol" } */
+ TestsuiteObject *o = [TestsuiteObject new];
+ return o; /* { dg-warning "class .TestsuiteObject. does not implement the .Foo. protocol" } */
}
@implementation Derived2
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-12.mm b/gcc/testsuite/obj-c++.dg/comp-types-12.mm
index 37feff0a723..1585937cb50 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-12.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-12.mm
@@ -1,10 +1,10 @@
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
-@interface Derived: Object
+@interface Derived: TestsuiteObject
@end
-extern Object* foo(void);
+extern TestsuiteObject* foo(void);
static Derived *test(void)
{
Derived *m = foo(); /* { dg-warning "initialization from distinct Objective\\-C type" } */
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-13.mm b/gcc/testsuite/obj-c++.dg/comp-types-13.mm
index 3a919d5d04c..5e32cfe9233 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-13.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-13.mm
@@ -1,14 +1,14 @@
/* When assigning function pointers, allow for covariant return types
and contravariant argument types. */
/* { dg-do compile } */
-#include <objc/Object.h>
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
@class Derived;
-Object *ExternFunc (Object *filePath, Object *key);
-typedef id FuncSignature (Object *arg1, Derived *arg2);
+TestsuiteObject *ExternFunc (TestsuiteObject *filePath, TestsuiteObject *key);
+typedef id FuncSignature (TestsuiteObject *arg1, Derived *arg2);
-@interface Derived: Object
+@interface Derived: TestsuiteObject
+ (void)registerFunc:(FuncSignature *)function;
@end
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-9.mm b/gcc/testsuite/obj-c++.dg/comp-types-9.mm
index 079140ac408..6c571325ad8 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-9.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-9.mm
@@ -2,9 +2,9 @@
/* Another gimplifier ICE... */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
-@interface MyView: Object {
+@interface MyView: TestsuiteObject {
int _frame;
}
- (void)_finalize;
diff --git a/gcc/testsuite/obj-c++.dg/cxx-ivars-1.mm b/gcc/testsuite/obj-c++.dg/cxx-ivars-1.mm
index 6e0c3fded4b..129215087eb 100644
--- a/gcc/testsuite/obj-c++.dg/cxx-ivars-1.mm
+++ b/gcc/testsuite/obj-c++.dg/cxx-ivars-1.mm
@@ -3,7 +3,7 @@
// { dg-options "-fno-objc-call-cxx-cdtors" }
// { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } }
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#define CHECK_IF(expr) if(!(expr)) abort()
@@ -17,7 +17,7 @@ struct cxx_struct {
}
};
-@interface Manip : Object {
+@interface Manip : TestsuiteObject {
int c;
cxx_struct s; // { dg-warning "user-defined destructor" }
// { dg-warning "constructors and destructors will not be invoked" "" { target *-*-* } 22 }
@@ -40,4 +40,4 @@ int main (void)
[obj manipulate_ivars];
[obj free];
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/cxx-ivars-2.mm b/gcc/testsuite/obj-c++.dg/cxx-ivars-2.mm
index 8f836ce9061..22ab118df82 100644
--- a/gcc/testsuite/obj-c++.dg/cxx-ivars-2.mm
+++ b/gcc/testsuite/obj-c++.dg/cxx-ivars-2.mm
@@ -6,7 +6,7 @@
// { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } }
// { dg-options "-fobjc-call-cxx-cdtors" }
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#define CHECK_IF(expr) if(!(expr)) abort()
@@ -31,7 +31,7 @@ struct boo: bar {
}
};
-@interface Baz: Object {
+@interface Baz: TestsuiteObject {
@public
bar aa;
}
@@ -76,4 +76,4 @@ int main (void)
[foo free];
CHECK_IF(!ctor1_called && !ctor2_called && dtor1_called);
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/cxx-scope-1.mm b/gcc/testsuite/obj-c++.dg/cxx-scope-1.mm
index a576bbd4f58..eb0c377dad9 100644
--- a/gcc/testsuite/obj-c++.dg/cxx-scope-1.mm
+++ b/gcc/testsuite/obj-c++.dg/cxx-scope-1.mm
@@ -3,7 +3,7 @@
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
@class Derived;
@@ -18,7 +18,7 @@ Derived *CxxClass::get_instance(int offs) {
return inst[offs];
}
-@interface Derived: Object {
+@interface Derived: TestsuiteObject {
int value;
}
-(id)initWithValue:(int)val;
@@ -51,4 +51,4 @@ int main(void) {
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/cxx-scope-2.mm b/gcc/testsuite/obj-c++.dg/cxx-scope-2.mm
index c793b282f39..6444ebc3aad 100644
--- a/gcc/testsuite/obj-c++.dg/cxx-scope-2.mm
+++ b/gcc/testsuite/obj-c++.dg/cxx-scope-2.mm
@@ -3,11 +3,11 @@
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
#include <iostream>
#include <string>
-@interface iostream: Object
+@interface iostream: TestsuiteObject
@end
int main(void) {
diff --git a/gcc/testsuite/obj-c++.dg/defs.mm b/gcc/testsuite/obj-c++.dg/defs.mm
index 0e8b26c72a6..23ba8f91ef6 100644
--- a/gcc/testsuite/obj-c++.dg/defs.mm
+++ b/gcc/testsuite/obj-c++.dg/defs.mm
@@ -3,13 +3,13 @@
/* { dg-options "" } */
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#include <objc/objc.h>
extern "C" void abort(void);
-@interface A : Object
+@interface A : TestsuiteObject
{
@public
int a;
@@ -40,4 +40,4 @@ int main()
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/encode-4.mm b/gcc/testsuite/obj-c++.dg/encode-4.mm
index b973abe2dbd..4f34644481e 100644
--- a/gcc/testsuite/obj-c++.dg/encode-4.mm
+++ b/gcc/testsuite/obj-c++.dg/encode-4.mm
@@ -16,23 +16,15 @@
/* Contributed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
-
-#ifdef __NEXT_RUNTIME__
-#define METHOD Method
-#else
-#include <objc/objc-api.h>
-#define METHOD Method_t
-#define method_get_types(M) (M)->method_types
-#endif
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
+#include "../objc-obj-c++-shared/runtime.h"
#include <stdio.h>
#include <stdlib.h>
#define CHECK_IF(expr) if(!(expr)) abort()
-@interface Foo: Object
+@interface Foo: TestsuiteObject
typedef struct { float x, y; } XXPoint;
typedef struct { float width, height; } XXSize;
typedef struct _XXRect { XXPoint origin; XXSize size; } XXRect;
@@ -74,28 +66,28 @@ unsigned offs1, offs2, offs3, offs4, offs5, offs6, offs7;
int main(void) {
Foo *foo = [[Foo alloc] init];
- Class fooClass = objc_get_class("Foo");
- METHOD meth;
+ Class fooClass = objc_getClass("Foo");
+ Method meth;
const char *string;
- meth = class_get_instance_method(fooClass, @selector(setRect:withInt:));
+ meth = class_getInstanceMethod(fooClass, @selector(setRect:withInt:));
offs2 = 9999;
- sscanf(method_get_types(meth), "@%u@%u:%u{_XXRect={?=ff}{?=ff}}%ui%u", &offs1, &offs2, &offs3,
+ sscanf(method_getTypeEncoding(meth), "@%u@%u:%u{_XXRect={?=ff}{?=ff}}%ui%u", &offs1, &offs2, &offs3,
&offs4, &offs5);
CHECK_IF(!offs2);
[foo setRect:my_rect withInt:123];
- meth = class_get_instance_method(fooClass, @selector(char:float:double:long:));
+ meth = class_getInstanceMethod(fooClass, @selector(char:float:double:long:));
offs2 = 9999;
if (sizeof (long) == 8)
string = "v%u@%u:%uc%uf%ud%uq%u";
else
string = "v%u@%u:%uc%uf%ud%ul%u";
- sscanf(method_get_types(meth), string, &offs1, &offs2, &offs3,
+ sscanf(method_getTypeEncoding(meth), string, &offs1, &offs2, &offs3,
&offs4, &offs5, &offs6, &offs7);
CHECK_IF(!offs2);
[foo char:'c' float:2.3 double:3.5 long:2345L];
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/encode-5.mm b/gcc/testsuite/obj-c++.dg/encode-5.mm
index 18db3f3dd8c..2924e502611 100644
--- a/gcc/testsuite/obj-c++.dg/encode-5.mm
+++ b/gcc/testsuite/obj-c++.dg/encode-5.mm
@@ -2,26 +2,19 @@
/* Contributed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
-#include "../objc-obj-c++-shared/Protocol1.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "../objc-obj-c++-shared/runtime.h"
+#include <objc/Protocol.h>
+
#ifdef __cplusplus
#define ProtoBool bool
#else
#define ProtoBool _Bool
#endif
-#ifdef __NEXT_RUNTIME__
-#define METHOD Method
-#else
-#include <objc/objc-api.h>
-#define METHOD Method_t
-#define method_get_types(M) (M)->method_types
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-
#define CHECK_IF(expr) if(!(expr)) abort()
enum Enum {
@@ -43,7 +36,7 @@ typedef struct _XXRect { XXPoint origin; XXSize size; struct _XXRect *next; } XX
Protocol *proto = @protocol(Proto);
struct objc_method_description *meth;
-
+struct objc_method_description meth_object;
unsigned totsize, offs0, offs1, offs2, offs3, offs4, offs5, offs6, offs7;
static void scan_initial(const char *pattern) {
@@ -56,7 +49,9 @@ static void scan_initial(const char *pattern) {
int main(void) {
const char *string;
- meth = [proto descriptionForInstanceMethod: @selector(char:float:double:unsigned:short:long:)];
+ meth_object = protocol_getMethodDescription (proto,
+ @selector(char:float:double:unsigned:short:long:), YES, YES);
+ meth = &meth_object;
if (sizeof (long) == 8)
string = "v%u@%u:%uc%uf%ud%uI%us%uq%u";
else
@@ -65,11 +60,16 @@ int main(void) {
CHECK_IF(offs3 == offs2 + sizeof(int) && offs4 == offs3 + sizeof(float));
CHECK_IF(offs5 == offs4 + sizeof(double) && offs6 == offs5 + sizeof(unsigned));
CHECK_IF(offs7 == offs6 + sizeof(int) && totsize == offs7 + sizeof(long));
- meth = [proto descriptionForInstanceMethod: @selector(setRect:withBool:withInt:)];
+ meth_object = protocol_getMethodDescription (proto,
+ @selector(setRect:withBool:withInt:), YES, YES);
+ meth = &meth_object;
scan_initial("^v%u@%u:%u{_XXRect={?=ff(__XXAngle=II)}{?=dd}^{_XXRect}}%uB%ui%u");
CHECK_IF(offs3 == offs2 + sizeof(XXRect) && offs4 == offs3 + sizeof(int));
CHECK_IF(totsize == offs4 + sizeof(int));
- meth = [proto descriptionForClassMethod: @selector(getEnum:enum:bool:)];
+ meth_object = protocol_getMethodDescription (proto,
+ @selector(getEnum:enum:bool:), YES, NO);
+ meth = &meth_object;
+
/* Here we have the complication that 'enum Enum' could be encoded
as 'i' on __NEXT_RUNTIME_, and (most likely) as 'I' on the GNU
runtime. So we get the @encode(enum Enum), then put it into the
@@ -80,16 +80,17 @@ int main(void) {
char pattern[1024];
sprintf (pattern, "^%s%%u@%%u:%%u^{?=ff(__XXAngle=II)}%%u%s%%uc%%u",
- @encode(enum Enum), @encode(enum Enum));
+ @encode(enum Enum), @encode(enum Enum));
scan_initial(pattern);
}
-
CHECK_IF(offs3 == offs2 + sizeof(XXPoint *) && offs4 == offs3 + sizeof(enum Enum));
CHECK_IF(totsize == offs4 + sizeof(int)); /* 'ObjCBool' is really 'char' */
- meth = [proto descriptionForClassMethod: @selector(getBool:)];
+ meth_object = protocol_getMethodDescription (proto,
+ @selector(getBool:), YES, NO);
+ meth = &meth_object;
scan_initial("^^B%u@%u:%u^*%u");
CHECK_IF(totsize == offs2 + sizeof(ObjCBool **));
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/encode-6.mm b/gcc/testsuite/obj-c++.dg/encode-6.mm
index 987d4a8ae2e..9a1e65f9276 100644
--- a/gcc/testsuite/obj-c++.dg/encode-6.mm
+++ b/gcc/testsuite/obj-c++.dg/encode-6.mm
@@ -3,11 +3,8 @@
/* { dg-options "" } */
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
-#ifndef __NEXT_RUNTIME__
-#include <objc/objc-api.h>
-#endif
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
+#include "../objc-obj-c++-shared/runtime.h"
#include <stdlib.h>
#include <string.h>
@@ -28,7 +25,7 @@ struct Nested {
struct Innermost innermost;
};
-@interface Int1: Object {
+@interface Int1: TestsuiteObject {
signed char a, b;
Int2 *int2;
struct Nested nested;
@@ -47,28 +44,28 @@ struct Nested {
@implementation Int2
@end
-#ifdef NEXT_OBJC_USE_NEW_INTERFACE
-Ivar *ivar;
-#else
+#if defined(__NEXT_RUNTIME__) && !defined(NEXT_OBJC_USE_NEW_INTERFACE)
struct objc_ivar *ivar;
+#else
+Ivar *ivar;
#endif
static void check_ivar(const char *name, const char *type) {
-#ifdef NEXT_OBJC_USE_NEW_INTERFACE
- CHECK_IF(!strcmp(ivar_getName(*ivar), name));
- CHECK_IF(!strcmp(ivar_getTypeEncoding(*ivar), type));
-#else
+#if defined(__NEXT_RUNTIME__) && !defined(NEXT_OBJC_USE_NEW_INTERFACE)
CHECK_IF(!strcmp(ivar->ivar_name, name));
CHECK_IF(!strcmp(ivar->ivar_type, type));
+#else
+ CHECK_IF(!strcmp(ivar_getName(*ivar), name));
+ CHECK_IF(!strcmp(ivar_getTypeEncoding(*ivar), type));
#endif
ivar++;
}
int main(void) {
-#ifdef NEXT_OBJC_USE_NEW_INTERFACE
- ivar = class_copyIvarList ((Class)objc_get_class("Int1"), NULL);
+#if defined(__NEXT_RUNTIME__) && !defined(NEXT_OBJC_USE_NEW_INTERFACE)
+ ivar = ((Class)objc_getClass("Int1"))->ivars->ivar_list;
#else
- ivar = ((Class)objc_get_class("Int1"))->ivars->ivar_list;
+ ivar = class_copyIvarList ((Class)objc_getClass("Int1"), NULL);
#endif
check_ivar("a", "c");
check_ivar("b", "c");
@@ -76,14 +73,14 @@ int main(void) {
check_ivar("nested",
"{Nested=\"a\"f\"b\"f\"next\"@\"Int1\"\"innermost\"{Innermost=\"a\"C\"b\"C\"encl\"^{Nested}}}");
-#ifdef NEXT_OBJC_USE_NEW_INTERFACE
- ivar = class_copyIvarList ((Class)objc_get_class("Int2"), NULL);
+#if defined(__NEXT_RUNTIME__) && !defined(NEXT_OBJC_USE_NEW_INTERFACE)
+ ivar = ((Class)objc_getClass("Int2"))->ivars->ivar_list;
#else
- ivar = ((Class)objc_get_class("Int2"))->ivars->ivar_list;
+ ivar = class_copyIvarList ((Class)objc_getClass("Int2"), NULL);
#endif
check_ivar("innermost", "^{Innermost=CC^{Nested}}");
check_ivar("base", "@\"Int1\"");
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/encode-7.mm b/gcc/testsuite/obj-c++.dg/encode-7.mm
index 523c7ce02e8..74c58ab95c8 100644
--- a/gcc/testsuite/obj-c++.dg/encode-7.mm
+++ b/gcc/testsuite/obj-c++.dg/encode-7.mm
@@ -9,21 +9,13 @@
/* Contributed by Alexander Malmberg <alexander@malmberg.org> */
-#include "../objc-obj-c++-shared/Object1.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
+#include "../objc-obj-c++-shared/runtime.h"
#include <stdlib.h>
#include <stdio.h>
#define CHECK_IF(expr) if(!(expr)) abort()
-#ifdef __NEXT_RUNTIME__
-#define METHOD Method
-#else
-#include <objc/objc-api.h>
-#define METHOD Method_t
-#define method_get_types(M) (M)->method_types
-#endif
-
-@interface Test : Object
+@interface Test : TestsuiteObject
{ float j; }
-(void) test2: (int [5])a with: (int [])b;
-(id) test3: (Test **)b; /* { dg-message "previous declaration of .\\-\\(id\\)test3:\\(Test \\*\\*\\)b." } */
@@ -47,8 +39,8 @@ int offs1, offs2, offs3, offs4, offs5, offs6;
int main(int argc, char **argv)
{
- Class testClass = objc_get_class("Test");
- METHOD meth;
+ Class testClass = objc_getClass("Test");
+ Method meth;
cc[0] = [Test new];
CHECK_IF (bb[3] == 3);
@@ -58,16 +50,16 @@ int main(int argc, char **argv)
[*c test2: bb with: bb + 5];
CHECK_IF (bb[3] == 5);
- meth = class_get_instance_method(testClass, @selector(test2:with:));
+ meth = class_getInstanceMethod(testClass, @selector(test2:with:));
offs1 = offs2 = offs3 = offs4 = offs5 = offs6 = -1;
- sscanf(method_get_types(meth), "v%d@%d:%d[%di]%d^i%d", &offs1, &offs2, &offs3,
+ sscanf(method_getTypeEncoding(meth), "v%d@%d:%d[%di]%d^i%d", &offs1, &offs2, &offs3,
&offs4, &offs5, &offs6);
CHECK_IF (!offs2 && offs4 == 5 && offs3 > 0);
CHECK_IF (offs5 == 2 * offs3 && offs6 == 3 * offs3 && offs1 == 4 * offs3);
- meth = class_get_instance_method(testClass, @selector(test3:));
+ meth = class_getInstanceMethod(testClass, @selector(test3:));
offs1 = offs2 = offs3 = offs4 = offs5 = offs6 = -1;
- sscanf(method_get_types(meth), "v%d@%d:%d[%d[%d{Test=#f}]]%d", &offs1, &offs2, &offs3,
+ sscanf(method_getTypeEncoding(meth), "v%d@%d:%d[%d[%d{Test=#f}]]%d", &offs1, &offs2, &offs3,
&offs4, &offs5, &offs6);
CHECK_IF (!offs2 && offs4 == 3 && offs5 == 4 && offs3 > 0);
CHECK_IF (offs6 == 2 * offs3 && offs1 == 3 * offs3);
diff --git a/gcc/testsuite/obj-c++.dg/except-1.mm b/gcc/testsuite/obj-c++.dg/except-1.mm
index b835dc73ee0..fbce2f27211 100644
--- a/gcc/testsuite/obj-c++.dg/except-1.mm
+++ b/gcc/testsuite/obj-c++.dg/except-1.mm
@@ -9,10 +9,10 @@
#include <stdio.h>
#include <stdlib.h>
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
// ObjectiveC class header
-@interface ObjCclass : Object {
+@interface ObjCclass : TestsuiteObject {
}
-(void)method1;
-(void)method2;
@@ -64,4 +64,3 @@ void CPPclass::function1()
abort ();
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
diff --git a/gcc/testsuite/obj-c++.dg/exceptions-2.mm b/gcc/testsuite/obj-c++.dg/exceptions-2.mm
index 989831f8482..c66d39ebca2 100644
--- a/gcc/testsuite/obj-c++.dg/exceptions-2.mm
+++ b/gcc/testsuite/obj-c++.dg/exceptions-2.mm
@@ -9,10 +9,10 @@
/* This test checks the syntax @catch (...) which catches any
exceptions. Check that code using it runs correctly. */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
-@interface MyObject : Object
+@interface MyObject : TestsuiteObject
@end
@implementation MyObject
@@ -47,7 +47,7 @@ int main (void)
if (test ([MyObject new]) != 5)
abort ();
- if (test ([Object new]) != 6)
+ if (test ([TestsuiteObject new]) != 6)
abort ();
return 0;
diff --git a/gcc/testsuite/obj-c++.dg/fix-and-continue-2.mm b/gcc/testsuite/obj-c++.dg/fix-and-continue-2.mm
index fdfbcbd0c18..03ae9ebd9cc 100644
--- a/gcc/testsuite/obj-c++.dg/fix-and-continue-2.mm
+++ b/gcc/testsuite/obj-c++.dg/fix-and-continue-2.mm
@@ -6,18 +6,18 @@
/* { dg-do assemble { target *-*-darwin* } } */
/* { dg-options "-mfix-and-continue" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
-@interface Foo: Object
-+ (Object *)indexableFileTypes;
+@interface Foo: TestsuiteObject
++ (TestsuiteObject *)indexableFileTypes;
@end
@implementation Foo
-+ (Object *)indexableFileTypes
++ (TestsuiteObject *)indexableFileTypes
{
- static Object *fileTypes = 0;
+ static TestsuiteObject *fileTypes = 0;
if(!fileTypes) {
- fileTypes = [Object new];
+ fileTypes = [TestsuiteObject new];
}
return fileTypes;
}
diff --git a/gcc/testsuite/obj-c++.dg/fsf-package-0.m b/gcc/testsuite/obj-c++.dg/fsf-package-0.m
index d6b4db21777..812989a42b2 100644
--- a/gcc/testsuite/obj-c++.dg/fsf-package-0.m
+++ b/gcc/testsuite/obj-c++.dg/fsf-package-0.m
@@ -1,9 +1,8 @@
/* { dg-do compile } */
-#import "../objc-obj-c++-shared/Object1.h"
-#include <objc/objc-api.h>
+#import "../objc-obj-c++-shared/TestsuiteObject.h"
-@interface obj : Object
+@interface obj : TestsuiteObject
{
@public
int v1;
diff --git a/gcc/testsuite/obj-c++.dg/gnu-runtime-1.mm b/gcc/testsuite/obj-c++.dg/gnu-runtime-1.mm
index c7e3bcc3a22..c73cd384c41 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-runtime-1.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-runtime-1.mm
@@ -4,9 +4,9 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
-#include <objc/Object.h>
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
-@interface FooBar: Object
+@interface FooBar: TestsuiteObject
- (void)boo;
@end
diff --git a/gcc/testsuite/obj-c++.dg/gnu-runtime-3.mm b/gcc/testsuite/obj-c++.dg/gnu-runtime-3.mm
index 429fce3e80b..56e48d791d4 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-runtime-3.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-runtime-3.mm
@@ -4,10 +4,10 @@
/* { dg-do run } */
/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
-#include <objc/Object.h>
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
-@interface FooBar: Object
+@interface FooBar: TestsuiteObject
- (void)boo;
@end
diff --git a/gcc/testsuite/obj-c++.dg/isa-field-1.mm b/gcc/testsuite/obj-c++.dg/isa-field-1.mm
index 4b93df8c485..4501d01a11e 100644
--- a/gcc/testsuite/obj-c++.dg/isa-field-1.mm
+++ b/gcc/testsuite/obj-c++.dg/isa-field-1.mm
@@ -1,28 +1,34 @@
-/* Ensure there are no bizarre difficulties with accessing the 'isa' field of
- objects. This field is named differently between GNU and NeXT runtimes so
- accessed via the CLASSPTRFIELD() macro defined in next-mapping.h */
+/* Ensure there are no bizarre difficulties with accessing the 'isa' field of objects. */
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
+#include "../objc-obj-c++-shared/runtime.h"
-@interface Object (Test)
+@interface TestsuiteObject (Test)
- (Class) test1: (id)object;
@end
-@interface Derived: Object
+@interface Derived: TestsuiteObject
- (Class) test2: (id)object;
@end
-@implementation Object (Test)
+@implementation TestsuiteObject (Test)
Class test1(id object) {
- Class cls = CLASSPTRFIELD(object);
- return cls;
+#ifdef __NEXT_RUNTIME__
+ Class cls = object->isa;
+#else
+ Class cls = object->class_pointer;
+#endif
+ return cls;
}
- (Class) test1: (id)object {
- Class cls = CLASSPTRFIELD(object);
- return cls;
+#ifdef __NEXT_RUNTIME__
+ Class cls = object->isa;
+#else
+ Class cls = object->class_pointer;
+#endif
+ return cls;
}
@end
@@ -30,18 +36,29 @@ Class test1(id object) {
@implementation Derived
Class test2(id object) {
- Class cls = CLASSPTRFIELD(object);
- return cls;
+#ifdef __NEXT_RUNTIME__
+ Class cls = object->isa;
+#else
+ Class cls = object->class_pointer;
+#endif
+ return cls;
}
- (Class) test2: (id)object {
- Class cls = CLASSPTRFIELD(object);
- return cls;
+#ifdef __NEXT_RUNTIME__
+ Class cls = object->isa;
+#else
+ Class cls = object->class_pointer;
+#endif
+ return cls;
}
@end
Class test3(id object) {
- Class cls = CLASSPTRFIELD(object);
- return cls;
+#ifdef __NEXT_RUNTIME__
+ Class cls = object->isa;
+#else
+ Class cls = object->class_pointer;
+#endif
+ return cls;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
diff --git a/gcc/testsuite/obj-c++.dg/ivar-list-semi.mm b/gcc/testsuite/obj-c++.dg/ivar-list-semi.mm
index 322de2fd470..00b336626bd 100644
--- a/gcc/testsuite/obj-c++.dg/ivar-list-semi.mm
+++ b/gcc/testsuite/obj-c++.dg/ivar-list-semi.mm
@@ -1,9 +1,9 @@
/* Allow for an optional semicolon following the ivar block. */
/* Contributed by: Ziemowit Laski <zlaski@apple.com>. */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
-@interface Tink : Object {
+@interface Tink : TestsuiteObject {
@private
unsigned long mCode[4];
};
diff --git a/gcc/testsuite/obj-c++.dg/layout-1.mm b/gcc/testsuite/obj-c++.dg/layout-1.mm
index 3cd4d1567fb..33879ad17a4 100644
--- a/gcc/testsuite/obj-c++.dg/layout-1.mm
+++ b/gcc/testsuite/obj-c++.dg/layout-1.mm
@@ -3,13 +3,13 @@
/* { dg-do compile } */
/* { dg-options "-Wpadded -Wpacked -Wabi" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
-@interface Derived1: Object
+@interface Derived1: TestsuiteObject
{ }
@end
-@interface Derived2: Object
+@interface Derived2: TestsuiteObject
- (id) foo;
@end
diff --git a/gcc/testsuite/obj-c++.dg/local-decl-1.mm b/gcc/testsuite/obj-c++.dg/local-decl-1.mm
index 6848572873c..f1c39b1c340 100644
--- a/gcc/testsuite/obj-c++.dg/local-decl-1.mm
+++ b/gcc/testsuite/obj-c++.dg/local-decl-1.mm
@@ -5,9 +5,9 @@
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
-@interface Sprite: Object {
+@interface Sprite: TestsuiteObject {
int sprite, spree;
}
+ (void)setFoo:(int)foo;
diff --git a/gcc/testsuite/obj-c++.dg/lookup-2.mm b/gcc/testsuite/obj-c++.dg/lookup-2.mm
index 5eaf38996de..6b969249e06 100644
--- a/gcc/testsuite/obj-c++.dg/lookup-2.mm
+++ b/gcc/testsuite/obj-c++.dg/lookup-2.mm
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
class MyWidget {
@@ -15,13 +15,13 @@ MyWidget gWidget;
- (MyWidget *)widget;
@end
-@interface Foo: Object
+@interface Foo: TestsuiteObject
@end
@interface Bar: Foo <MyProto>
@end
-@interface Container: Object
+@interface Container: TestsuiteObject
+ (MyWidget *)elementForView:(Foo *)view;
@end
@@ -38,7 +38,8 @@ MyWidget gWidget;
+ (MyWidget *)elementForView:(Foo *)view
{
MyWidget *widget = 0;
- if ([view conformsTo:@protocol(MyProto)]) {
+ if (class_conformsToProtocol (object_getClass (view),
+ @protocol(MyProto))) {
widget = [(Foo <MyProto> *)view widget];
}
return widget;
@@ -55,4 +56,3 @@ int main(void) {
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
diff --git a/gcc/testsuite/obj-c++.dg/method-10.mm b/gcc/testsuite/obj-c++.dg/method-10.mm
index cac5d9791a9..0c4ce56d343 100644
--- a/gcc/testsuite/obj-c++.dg/method-10.mm
+++ b/gcc/testsuite/obj-c++.dg/method-10.mm
@@ -3,17 +3,17 @@
/* { dg-options "" } */
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#define CHECK_IF(expr) if(!(expr)) abort()
-@interface Int1: Object
+@interface Int1: TestsuiteObject
+ (int) classMeth;
- (int) instanceMeth;
@end
-@interface Int2: Object
+@interface Int2: TestsuiteObject
+ (int) classMeth;
- (int) instanceMeth;
@end
@@ -43,4 +43,4 @@ int main(void) {
CHECK_IF([(Int1Alias *)int2typedef instanceMeth] == 1697);
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/method-11.mm b/gcc/testsuite/obj-c++.dg/method-11.mm
index 74192e80f79..29e739a9128 100644
--- a/gcc/testsuite/obj-c++.dg/method-11.mm
+++ b/gcc/testsuite/obj-c++.dg/method-11.mm
@@ -5,16 +5,16 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
-typedef Object ObjectTypedef1;
+typedef TestsuiteObject ObjectTypedef1;
typedef ObjectTypedef1 ObjectTypedef2;
@compatibility_alias ObjectAlias1 ObjectTypedef2;
@compatibility_alias ObjectAlias2 ObjectAlias1;
typedef ObjectAlias2 ObjectTypedef3;
void foo(void) {
- id obj = [Object new];
+ id obj = [TestsuiteObject new];
obj = [ObjectTypedef1 new];
obj = [ObjectTypedef2 new];
obj = [ObjectTypedef3 new];
@@ -23,7 +23,7 @@ void foo(void) {
}
/* { dg-final { scan-assembler "_OBJC_ClassRefs_0" { target { *-*-darwin* && { ! lp64 } } } } } */
-/* { dg-final { scan-assembler "_OBJC_ClassRef_Object" { target { *-*-darwin* && { lp64 } } } } } */
+/* { dg-final { scan-assembler "_OBJC_ClassRef_TestsuiteObject" { target { *-*-darwin* && { lp64 } } } } } */
/* { dg-final { scan-assembler-not "_OBJC_ClassRefs_1" { target { *-*-darwin* && { ! lp64 } } } } } */
/* { dg-final { scan-assembler-not "_OBJC_ClassRef_ObjectTypedef" { target { *-*-darwin* && { lp64 } } } } } */
/* { dg-final { scan-assembler-not "_OBJC_ClassRef_ObjectAlias" { target { *-*-darwin* && { lp64 } } } } } */
diff --git a/gcc/testsuite/obj-c++.dg/method-12.mm b/gcc/testsuite/obj-c++.dg/method-12.mm
index 7c6916b320d..c1f2a39dfa7 100644
--- a/gcc/testsuite/obj-c++.dg/method-12.mm
+++ b/gcc/testsuite/obj-c++.dg/method-12.mm
@@ -3,7 +3,7 @@
/* { dg-options "-Wstrict-selector-match" } */
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Protocol1.h"
+#include <objc/Protocol.h>
@interface Base
- (unsigned)port;
diff --git a/gcc/testsuite/obj-c++.dg/method-13.mm b/gcc/testsuite/obj-c++.dg/method-13.mm
index 6938f7d349a..ee167bde36f 100644
--- a/gcc/testsuite/obj-c++.dg/method-13.mm
+++ b/gcc/testsuite/obj-c++.dg/method-13.mm
@@ -1,11 +1,11 @@
/* Check if finding multiple signatures for a method is handled gracefully. Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-options "-Wstrict-selector-match" } */
/* { dg-do compile } */
-
-#include "../objc-obj-c++-shared/Object1.h"
+#include <objc/objc.h>
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
@interface Class1
-- (void)setWindow:(Object *)wdw;
+- (void)setWindow:(TestsuiteObject *)wdw;
@end
@interface Class2
@@ -13,14 +13,14 @@
@end
id foo(void) {
- Object *obj = [[Object alloc] init];
+ TestsuiteObject *obj = [[TestsuiteObject alloc] init];
id obj2 = obj;
- [obj setWindow:nil]; /* { dg-warning ".Object. may not respond to .\\-setWindow:." } */
+ [obj setWindow:nil]; /* { dg-warning ".TestsuiteObject. may not respond to .\\-setWindow:." } */
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 18 } */
/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 18 } */
/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 18 } */
[obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
- /* { dg-message "using .\\-\\(void\\)setWindow:\\(Object \\*\\)wdw." "" { target *-*-* } 8 } */
+ /* { dg-message "using .\\-\\(void\\)setWindow:\\(TestsuiteObject \\*\\)wdw." "" { target *-*-* } 8 } */
/* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 12 } */
return obj;
diff --git a/gcc/testsuite/obj-c++.dg/method-15.mm b/gcc/testsuite/obj-c++.dg/method-15.mm
index 860aad63eab..f3cef2565a8 100644
--- a/gcc/testsuite/obj-c++.dg/method-15.mm
+++ b/gcc/testsuite/obj-c++.dg/method-15.mm
@@ -3,10 +3,10 @@
/* { dg-options "-Wstrict-selector-match" } */
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
@protocol MyObject
-- (id)initWithData:(Object *)data;
+- (id)initWithData:(TestsuiteObject *)data;
@end
@protocol SomeOther
@@ -17,9 +17,9 @@
- (id)initWithData:(id<MyObject, MyCoding>)data;
@end
-@interface NTGridDataObject: Object <MyCoding>
+@interface NTGridDataObject: TestsuiteObject <MyCoding>
{
- Object<MyCoding> *_data;
+ TestsuiteObject<MyCoding> *_data;
}
+ (NTGridDataObject*)dataObject:(id<MyObject, MyCoding>)data;
@end
@@ -32,7 +32,7 @@
{
NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data];
/* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 33 } */
- /* { dg-message "using .\\-\\(id\\)initWithData:\\(Object \\*\\)data." "" { target *-*-* } 9 } */
+ /* { dg-message "using .\\-\\(id\\)initWithData:\\(TestsuiteObject \\*\\)data." "" { target *-*-* } 9 } */
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 17 } */
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 13 } */
diff --git a/gcc/testsuite/obj-c++.dg/method-17.mm b/gcc/testsuite/obj-c++.dg/method-17.mm
index cb60473b345..3566a652bc2 100644
--- a/gcc/testsuite/obj-c++.dg/method-17.mm
+++ b/gcc/testsuite/obj-c++.dg/method-17.mm
@@ -4,14 +4,14 @@
take place). */
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#define CHECK_IF(expr) if(!(expr)) abort()
static double d = 4.5920234e2;
-@interface Foo : Object
+@interface Foo : TestsuiteObject
-(void) brokenType: (int)x floatingPoint: (double)y;
@end
@@ -30,4 +30,4 @@ int main(void)
[foo brokenType: (int)d floatingPoint: d];
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/method-19.mm b/gcc/testsuite/obj-c++.dg/method-19.mm
index 5dca80494ce..225becae0f1 100644
--- a/gcc/testsuite/obj-c++.dg/method-19.mm
+++ b/gcc/testsuite/obj-c++.dg/method-19.mm
@@ -4,12 +4,8 @@
/* Author: Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/next-mapping.h"
#include <objc/objc.h>
-
-#ifndef __NEXT_RUNTIME__
-#include <objc/objc-api.h>
-#endif
+#include "../objc-obj-c++-shared/runtime.h"
#include <stdlib.h>
#include <string.h>
@@ -47,16 +43,14 @@
@end
@implementation Root
-#ifdef __NEXT_RUNTIME__
+ initialize { return self; }
-#endif
- (const char *) method1 { return "Root::-method1"; }
+ (const char *) method2 { return "Root::+method2"; }
@end
int main(void)
{
- Class obj = objc_get_class("Derived");
+ Class obj = objc_getClass("Derived");
/* None of the following should elicit compiler-time warnings. */
@@ -75,4 +69,4 @@ int main(void)
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/method-2.mm b/gcc/testsuite/obj-c++.dg/method-2.mm
index 117d420e14a..e4973c34e7d 100644
--- a/gcc/testsuite/obj-c++.dg/method-2.mm
+++ b/gcc/testsuite/obj-c++.dg/method-2.mm
@@ -4,7 +4,8 @@
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
+#include "../objc-obj-c++-shared/runtime.h"
@class NSString;
@@ -13,19 +14,19 @@
+ (BOOL)usesUserKeyEquivalents;
@end
-@interface NSMenuItem : Object <NSMenuItem> {
+@interface NSMenuItem : TestsuiteObject <NSMenuItem> {
@private
id _menu;
}
@end
-@interface NSResponder : Object <NSMenuItem>
+@interface NSResponder : TestsuiteObject <NSMenuItem>
{
id _nextResponder;
}
@end
-@interface Object(NSMenuValidation)
+@interface TestsuiteObject(NSMenuValidation)
- (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem;
@end
diff --git a/gcc/testsuite/obj-c++.dg/method-21.mm b/gcc/testsuite/obj-c++.dg/method-21.mm
index 898768d6d1c..d9332beb073 100644
--- a/gcc/testsuite/obj-c++.dg/method-21.mm
+++ b/gcc/testsuite/obj-c++.dg/method-21.mm
@@ -2,9 +2,9 @@
/* { dg-do compile } */
/* { dg-options "-Wreturn-type -Wextra" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
-@interface Foo: Object
+@interface Foo: TestsuiteObject
- (id) meth1;
- (void) meth2;
@end
@@ -14,7 +14,7 @@ extern int bar;
@implementation Foo
- (id) meth1 {
if (bar)
- return [Object new];
+ return [TestsuiteObject new];
return; /* { dg-error "return.statement with no value" } */
}
- (void) meth2 {
diff --git a/gcc/testsuite/obj-c++.dg/method-22.mm b/gcc/testsuite/obj-c++.dg/method-22.mm
index 610c178e92a..587f3bbb9a3 100644
--- a/gcc/testsuite/obj-c++.dg/method-22.mm
+++ b/gcc/testsuite/obj-c++.dg/method-22.mm
@@ -1,15 +1,14 @@
/* Ensure that overload resolution does not produce warnings as
side-effects. */
/* { dg-do run } */
-/* { dg-additional-sources "../objc-obj-c++-shared/Object1.mm" } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#define CHECK_IF(E) if(!(E)) abort ()
-@interface MyCursor: Object
+@interface MyCursor: TestsuiteObject
+ (MyCursor *)crosshairCursor;
@end
diff --git a/gcc/testsuite/obj-c++.dg/method-23.mm b/gcc/testsuite/obj-c++.dg/method-23.mm
index 2b59cb8fc66..de8de844c45 100644
--- a/gcc/testsuite/obj-c++.dg/method-23.mm
+++ b/gcc/testsuite/obj-c++.dg/method-23.mm
@@ -2,10 +2,9 @@
they should. */
/* { dg-do run } */
/* { dg-options "-O2" } */
-/* { dg-additional-sources "../objc-obj-c++-shared/Object1.mm" } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <string.h>
#include <stdlib.h>
@@ -19,7 +18,7 @@ char *strcpy_like_callee(const char *s) {
typedef char io_string_t[512];
typedef char *(func_type)(const char *);
-@interface DeviceObject: Object
+@interface DeviceObject: TestsuiteObject
- (void) func:(func_type)func stucPathInIORegistry:(io_string_t)ioRegPath;
@end
@implementation DeviceObject
diff --git a/gcc/testsuite/obj-c++.dg/method-6.mm b/gcc/testsuite/obj-c++.dg/method-6.mm
index 0e099227cd1..9cc99995bde 100644
--- a/gcc/testsuite/obj-c++.dg/method-6.mm
+++ b/gcc/testsuite/obj-c++.dg/method-6.mm
@@ -3,7 +3,7 @@
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
@class NotKnown;
diff --git a/gcc/testsuite/obj-c++.dg/no-extra-load.mm b/gcc/testsuite/obj-c++.dg/no-extra-load.mm
index 1663ebc2132..815ee789e41 100644
--- a/gcc/testsuite/obj-c++.dg/no-extra-load.mm
+++ b/gcc/testsuite/obj-c++.dg/no-extra-load.mm
@@ -2,10 +2,10 @@
// { dg-do compile }
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
#include <iostream>
-@interface Greeter : Object
+@interface Greeter : TestsuiteObject
- (void) greet: (const char *)msg;
@end
diff --git a/gcc/testsuite/obj-c++.dg/objc-gc-3.mm b/gcc/testsuite/obj-c++.dg/objc-gc-3.mm
index c0249e7a962..430e5832eb6 100644
--- a/gcc/testsuite/obj-c++.dg/objc-gc-3.mm
+++ b/gcc/testsuite/obj-c++.dg/objc-gc-3.mm
@@ -6,11 +6,12 @@
/* { dg-options "-fobjc-gc" } */
/* { dg-prune-output "cc1objplus: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
+#include "../objc-obj-c++-shared/runtime.h"
@class MyWindow;
-@interface MyDocument : Object {
+@interface MyDocument : TestsuiteObject {
MyWindow *_window;
}
@end
@@ -29,7 +30,7 @@
@end
@interface MyTextFileDocument : MyFileDocument {
- Object *_textStorage;
+ TestsuiteObject *_textStorage;
struct __tfdFlags {
unsigned int immutable:1;
unsigned int lineEnding:2;
diff --git a/gcc/testsuite/obj-c++.dg/property/property-1.mm b/gcc/testsuite/obj-c++.dg/property/property-1.mm
index 4447946d1ab..57a171337c6 100644
--- a/gcc/testsuite/obj-c++.dg/property/property-1.mm
+++ b/gcc/testsuite/obj-c++.dg/property/property-1.mm
@@ -1,11 +1,10 @@
/* This program tests use of property provided setter/getter functions. */
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-/* { dg-additional-sources "../../objc-obj-c++-shared/Object1.mm" } */
-#import "../../objc-obj-c++-shared/Object1.h"
+#import "../../objc-obj-c++-shared/TestsuiteObject.m"
-@interface Bar : Object
+@interface Bar : TestsuiteObject
{
int iVar;
}
diff --git a/gcc/testsuite/obj-c++.dg/proto-lossage-2.mm b/gcc/testsuite/obj-c++.dg/proto-lossage-2.mm
index 361bb9087e6..c1447ca85db 100644
--- a/gcc/testsuite/obj-c++.dg/proto-lossage-2.mm
+++ b/gcc/testsuite/obj-c++.dg/proto-lossage-2.mm
@@ -2,13 +2,14 @@
provide a suitable method. */
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
+#include <objc/objc.h>
@protocol Zot
-(void) zot;
@end
-@interface Foo : Object <Zot>
+@interface Foo : TestsuiteObject <Zot>
@end
int foo()
diff --git a/gcc/testsuite/obj-c++.dg/proto-lossage-3.mm b/gcc/testsuite/obj-c++.dg/proto-lossage-3.mm
index ac66ace5796..9c08f07e4d9 100644
--- a/gcc/testsuite/obj-c++.dg/proto-lossage-3.mm
+++ b/gcc/testsuite/obj-c++.dg/proto-lossage-3.mm
@@ -3,10 +3,12 @@
Problem report and original fix by richard@brainstorm.co.uk. */
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-/* { dg-additional-sources "../objc-obj-c++-shared/Object1.mm" } */
+#include <objc/Protocol.h>
+#include "../objc-obj-c++-shared/runtime.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
-#include "../objc-obj-c++-shared/Protocol1.h"
+@interface MyClass
+- name;
+@end
@protocol NoInstanceMethods
+ testMethod;
@@ -19,16 +21,9 @@
int
main()
{
-#ifdef __OBJC2__
-protocol_getMethodDescription(@protocol(NoInstanceMethods), @selector(name), NO, YES);
-protocol_getMethodDescription(@protocol(NoInstanceMethods), @selector(name), NO, NO);
-protocol_getMethodDescription(@protocol(NoClassMethods), @selector(name), NO, YES);
-protocol_getMethodDescription(@protocol(NoClassMethods), @selector(name), NO, NO);
-#else
-[@protocol(NoInstanceMethods) descriptionForInstanceMethod: @selector(name)];
-[@protocol(NoInstanceMethods) descriptionForClassMethod: @selector(name)];
-[@protocol(NoClassMethods) descriptionForInstanceMethod: @selector(name)];
-[@protocol(NoClassMethods) descriptionForClassMethod: @selector(name)];
-#endif
+protocol_getMethodDescription (@protocol(NoInstanceMethods), @selector(name), YES, YES);
+protocol_getMethodDescription (@protocol(NoInstanceMethods), @selector(name), YES, NO);
+protocol_getMethodDescription (@protocol(NoClassMethods), @selector(name), YES, YES);
+protocol_getMethodDescription (@protocol(NoClassMethods), @selector(name), YES, NO);
return 0;
}
diff --git a/gcc/testsuite/obj-c++.dg/proto-qual-1.mm b/gcc/testsuite/obj-c++.dg/proto-qual-1.mm
index 959181b8641..7ef0e9a98ef 100644
--- a/gcc/testsuite/obj-c++.dg/proto-qual-1.mm
+++ b/gcc/testsuite/obj-c++.dg/proto-qual-1.mm
@@ -6,10 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
-#ifndef __NEXT_RUNTIME__
-#include <objc/objc-api.h>
-#endif
-#include "../objc-obj-c++-shared/next-mapping.h"
+#include "../objc-obj-c++-shared/runtime.h"
#include <objc/Protocol.h>
/* The encoded parameter sizes will be rounded up to match pointer alignment. */
@@ -34,9 +31,7 @@
Protocol *proto;
struct objc_method_description *meth;
-#ifdef NEXT_OBJC_USE_NEW_INTERFACE
struct objc_method_description meth_object;
-#endif
unsigned totsize, offs0, offs1, offs2, offs3, offs4, offs5, offs6, offs7;
static void scan_initial(const char *pattern) {
@@ -48,22 +43,18 @@ static void scan_initial(const char *pattern) {
int main(void) {
proto = @protocol(Retain);
-#ifdef NEXT_OBJC_USE_NEW_INTERFACE
- meth_object = protocol_getMethodDescription (proto, @selector(address:with:),
- YES, YES);
+
+ meth_object = protocol_getMethodDescription (proto,
+ @selector(address:with:), YES, YES);
meth = &meth_object;
-#else
- meth = [proto descriptionForInstanceMethod: @selector(address:with:)];
-#endif
+
scan_initial("O@%u@%u:%uNR@%uo^^S%u");
CHECK_IF(offs3 == offs2 + aligned_sizeof(id) && totsize == offs3 + aligned_sizeof(unsigned));
-#ifdef NEXT_OBJC_USE_NEW_INTERFACE
- meth_object = protocol_getMethodDescription (proto, @selector(retainArgument:with:),
- YES, NO);
+
+ meth_object = protocol_getMethodDescription (proto,
+ @selector(retainArgument:with:), YES, NO);
meth = &meth_object;
-#else
- meth = [proto descriptionForClassMethod: @selector(retainArgument:with:)];
-#endif
+
scan_initial("Vv%u@%u:%uOo@%un^*%u");
CHECK_IF(offs3 == offs2 + aligned_sizeof(id) && totsize == offs3 + aligned_sizeof(char **));
return 0;
diff --git a/gcc/testsuite/obj-c++.dg/qual-types-1.mm b/gcc/testsuite/obj-c++.dg/qual-types-1.mm
index 2b0a7be591d..dd0eb42bc4f 100644
--- a/gcc/testsuite/obj-c++.dg/qual-types-1.mm
+++ b/gcc/testsuite/obj-c++.dg/qual-types-1.mm
@@ -4,7 +4,7 @@
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#define CHECK_IF(expr) if(!(expr)) abort()
@@ -19,7 +19,7 @@
- init;
@end
-@interface Foo: Object
+@interface Foo: TestsuiteObject
{ @public int val; }
- init;
@end
@@ -37,7 +37,7 @@ template <typename T> struct Holder
Holder(void) { obj = [[T alloc] init]; }
~Holder(void) { [obj free]; --counter; }
id <Init, Zone> getObjId(void) { return obj; }
- Object <Zone, Init> *getObj(void) { return obj; }
+ TestsuiteObject <Zone, Init> *getObj(void) { return obj; }
};
typedef Holder <Foo <Init, Zone> > FooHolder;
@@ -66,4 +66,4 @@ int main (void) {
CHECK_IF(FooHolder::counter == 0);
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/selector-2.mm b/gcc/testsuite/obj-c++.dg/selector-2.mm
index b3a3579e927..840ee19fee4 100644
--- a/gcc/testsuite/obj-c++.dg/selector-2.mm
+++ b/gcc/testsuite/obj-c++.dg/selector-2.mm
@@ -2,7 +2,7 @@
/* { dg-options "-Wselector" } */
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include <objc/objc.h>
@interface Foo
@end
diff --git a/gcc/testsuite/obj-c++.dg/selector-5.mm b/gcc/testsuite/obj-c++.dg/selector-5.mm
index 5a3a4b614b2..64e82200da8 100644
--- a/gcc/testsuite/obj-c++.dg/selector-5.mm
+++ b/gcc/testsuite/obj-c++.dg/selector-5.mm
@@ -1,7 +1,7 @@
/* { dg-options "" } */
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include <objc/objc.h>
int main()
{
diff --git a/gcc/testsuite/obj-c++.dg/selector-6.mm b/gcc/testsuite/obj-c++.dg/selector-6.mm
index 4ba8e2b366b..9ec37fa8e91 100644
--- a/gcc/testsuite/obj-c++.dg/selector-6.mm
+++ b/gcc/testsuite/obj-c++.dg/selector-6.mm
@@ -1,7 +1,7 @@
/* { dg-options "" } */
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include <objc/objc.h>
int main()
{
diff --git a/gcc/testsuite/obj-c++.dg/set-not-used-1.mm b/gcc/testsuite/obj-c++.dg/set-not-used-1.mm
index 6380ec9df5d..21ce962e816 100644
--- a/gcc/testsuite/obj-c++.dg/set-not-used-1.mm
+++ b/gcc/testsuite/obj-c++.dg/set-not-used-1.mm
@@ -2,10 +2,9 @@
/* { dg-do compile } */
/* { dg-options "-Wunused-but-set-variable" } */
-#import "../objc-obj-c++-shared/Object1.h"
-#include <objc/objc-api.h>
+#import "../objc-obj-c++-shared/TestsuiteObject.m"
-@interface obj : Object
+@interface obj : TestsuiteObject
{
int value;
}
@@ -13,7 +12,7 @@
- (void) setValue: (int)number;
@end
-@implementation obj : Object
+@implementation obj : TestsuiteObject
- (int) value { return value; }
- (void) setValue: (int)number { value = number; }
diff --git a/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm b/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm
index 921d055659c..430ab5db2d6 100644
--- a/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm
+++ b/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm
@@ -5,7 +5,8 @@
/* { dg-options "-fconstant-string-class=Foo" } */
/* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */
-#include "../../objc-obj-c++-shared/Object1.h"
+#include <objc/Object.h>
+#include "../../objc-obj-c++-shared/objc-test-suite-types.h"
@interface Foo: Object {
char *cString;
@@ -18,11 +19,7 @@
+ (Foo *) getString: (int) which;
@end
-#ifdef NEXT_OBJC_USE_NEW_INTERFACE
-Class _FooClassReference;
-#else
-struct objc_class _FooClassReference;
-#endif
+TNS_STRING_REF_T _FooClassReference; /* Only used by NeXT. */
@implementation Bar
+ (Foo *) getString: (int) which {
diff --git a/gcc/testsuite/obj-c++.dg/strings/strings-1.mm b/gcc/testsuite/obj-c++.dg/strings/strings-1.mm
index fc3f211857a..408392fd5a0 100644
--- a/gcc/testsuite/obj-c++.dg/strings/strings-1.mm
+++ b/gcc/testsuite/obj-c++.dg/strings/strings-1.mm
@@ -1,8 +1,7 @@
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
/* { dg-do compile } */
-#include "../../objc-obj-c++-shared/Object1.h"
-#include "../../objc-obj-c++-shared/next-mapping.h"
+#include "../../objc-obj-c++-shared/runtime.h"
#ifndef __NEXT_RUNTIME__
#include <objc/NXConstStr.h>
#endif
@@ -30,4 +29,4 @@ id test_invalid7 = @"te" @"s" @@"t"; /* { dg-error "repeated .@. bef
id test_invalid8 = @"te" @@"s" @"t"; /* { dg-error "repeated .@. before Objective-C string" } */
id test_invalid9 = @"te" @"s" @"t" @; /* { dg-error "stray .@. in program" } */
id test_invalidA = @"te" @ st; /* { dg-error "stray .@. in program" } */
- /* { dg-error "expected" "" { target *-*-* } 32 } */
+ /* { dg-error "expected" "" { target *-*-* } 31 } */
diff --git a/gcc/testsuite/obj-c++.dg/super-class-2.mm b/gcc/testsuite/obj-c++.dg/super-class-2.mm
index 4ec0c3f471b..efc72b81927 100644
--- a/gcc/testsuite/obj-c++.dg/super-class-2.mm
+++ b/gcc/testsuite/obj-c++.dg/super-class-2.mm
@@ -4,11 +4,11 @@
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
@class MyWpModule;
-@compatibility_alias MyObject Object;
+@compatibility_alias MyObject TestsuiteObject;
@compatibility_alias FictitiousModule MyWpModule;
@protocol MySelTarget
diff --git a/gcc/testsuite/obj-c++.dg/sync-2.mm b/gcc/testsuite/obj-c++.dg/sync-2.mm
index c2143a4e95b..c73bbd92fbc 100644
--- a/gcc/testsuite/obj-c++.dg/sync-2.mm
+++ b/gcc/testsuite/obj-c++.dg/sync-2.mm
@@ -1,13 +1,13 @@
/* Make sure that @synchronized parses and a very basic test runs. */
/* { dg-options "-fobjc-exceptions -fgnu-runtime" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
int main (void)
{
- Object *a = [Object new];
- Object *b = [Object new];
- Object *c = [Object new];
+ TestsuiteObject *a = [TestsuiteObject new];
+ TestsuiteObject *b = [TestsuiteObject new];
+ TestsuiteObject *c = [TestsuiteObject new];
/* This single-threaded test just checks that @synchronized() uses a
recursive mutex, and that the runtime at least doesn't crash
diff --git a/gcc/testsuite/obj-c++.dg/template-1.mm b/gcc/testsuite/obj-c++.dg/template-1.mm
index fc8b08b5ed6..434c52707c5 100644
--- a/gcc/testsuite/obj-c++.dg/template-1.mm
+++ b/gcc/testsuite/obj-c++.dg/template-1.mm
@@ -3,12 +3,12 @@
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#define CHECK_IF(expr) if(!(expr)) abort()
-@interface Base: Object
+@interface Base: TestsuiteObject
- (int) meth;
@end
@@ -47,4 +47,4 @@ int main (void) {
CHECK_IF(count == 0);
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/template-3.mm b/gcc/testsuite/obj-c++.dg/template-3.mm
index a3b96b32d7e..c564733cf74 100644
--- a/gcc/testsuite/obj-c++.dg/template-3.mm
+++ b/gcc/testsuite/obj-c++.dg/template-3.mm
@@ -4,12 +4,12 @@
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#define CHECK_IF(expr) if(!(expr)) abort()
-@interface ObjCClass : Object
+@interface ObjCClass : TestsuiteObject
{
@public
int info;
@@ -78,4 +78,4 @@ int main(void) {
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/template-4.mm b/gcc/testsuite/obj-c++.dg/template-4.mm
index af3145f055a..5301df5c0e0 100644
--- a/gcc/testsuite/obj-c++.dg/template-4.mm
+++ b/gcc/testsuite/obj-c++.dg/template-4.mm
@@ -3,7 +3,7 @@
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
/* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
-/* { dg-additional-sources "../objc-obj-c++-shared/Object1.mm ../objc-obj-c++-shared/nsconstantstring-class-impl.mm" } */
+/* { dg-additional-sources "../objc-obj-c++-shared/nsconstantstring-class-impl.mm" } */
#include <stdarg.h>
#include <stdlib.h>
@@ -15,8 +15,8 @@
#include "../objc-obj-c++-shared/nsconstantstring-class.h"
#endif
-#include "../objc-obj-c++-shared/Object1.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
+#include "../objc-obj-c++-shared/runtime.h"
#define CHECK_IF(expr) if(!(expr)) abort()
@@ -42,7 +42,7 @@ int abc(TYPE *xyz, Array *array) {
return [xyz count] + [array count];
}
-@interface Array: Object {
+@interface Array: TestsuiteObject {
id *arr;
int count;
}
@@ -72,7 +72,7 @@ int abc(TYPE *xyz, Array *array) {
@end
int main(void) {
- CHECK_IF(!strcmp ([@"Object" cString], getDesc<Object>()));
+ CHECK_IF(!strcmp ([@"TestsuiteObject" cString], getDesc<TestsuiteObject>()));
CHECK_IF(!strcmp ([@"Array" cString], getDesc<Array>()));
Array* a1 = [Array arrayWithObjects:@"One", @"Two", @"Three", nil];
diff --git a/gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm b/gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm
index 672a311633c..c48181049f1 100644
--- a/gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm
+++ b/gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm
@@ -6,14 +6,10 @@
#include <stdio.h>
#include <string.h>
-#include "../objc-obj-c++-shared/Protocol1.h"
-#ifndef __NEXT_RUNTIME__
-#include <objc/objc-api.h>
-#endif
+#include "../objc-obj-c++-shared/runtime.h"
extern "C" void abort();
-
@protocol CommonProtocol
-(oneway void)methodCall_On:(in bycopy id)someValue_On;
@@ -48,25 +44,32 @@ extern "C" void abort();
Protocol *proto = @protocol(CommonProtocol);
struct objc_method_description *meth;
+struct objc_method_description meth_object;
int main()
{
- meth = [proto descriptionForInstanceMethod: @selector(methodCall_On:)];
+ meth_object = protocol_getMethodDescription (proto, @selector(methodCall_On:), YES, YES);
+ meth = &meth_object;
if (strcmp (meth->types, "Vv12@0:4On@8"))
abort();
- meth = [proto descriptionForInstanceMethod: @selector(methodCall_nO:)];
+ meth_object = protocol_getMethodDescription (proto, @selector(methodCall_nO:), YES, YES);
+ meth = &meth_object;
if (strcmp (meth->types, "Vv12@0:4nO@8"))
abort();
- meth = [proto descriptionForInstanceMethod: @selector(methodCall_Oo:)];
+ meth_object = protocol_getMethodDescription (proto, @selector(methodCall_Oo:), YES, YES);
+ meth = &meth_object;
if (strcmp (meth->types, "Vv12@0:4Oo@8"))
abort();
- meth = [proto descriptionForInstanceMethod: @selector(methodCall_oO:)];
+ meth_object = protocol_getMethodDescription (proto, @selector(methodCall_oO:), YES, YES);
+ meth = &meth_object;
if (strcmp (meth->types, "Vv12@0:4oO@8"))
abort();
- meth = [proto descriptionForInstanceMethod: @selector(methodCall_rn:)];
+ meth_object = protocol_getMethodDescription (proto, @selector(methodCall_rn:), YES, YES);
+ meth = &meth_object;
if (strcmp (meth->types, "Vv12@0:4rn@8"))
abort();
- meth = [proto descriptionForInstanceMethod: @selector(methodCall_oOn:)];
+ meth_object = protocol_getMethodDescription (proto, @selector(methodCall_oOn:), YES, YES);
+ meth = &meth_object;
if (strcmp (meth->types, "Vv12@0:4oOn@8"))
abort();
return 0;
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm
index 3cb3acfae3b..cba188b70e3 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm
@@ -6,7 +6,8 @@
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
-#include "../../../objc-obj-c++-shared/Object1.h"
+#include <objc/Object.h>
+#include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */
@interface NSString: Object
@end
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm
index 8674646d880..c54f89bd8c8 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm
@@ -7,7 +7,8 @@
/* { dg-options "-fconstant-string-class=XStr" } */
/* { dg-options "-mno-constant-cfstrings -fconstant-string-class=XStr" { target *-*-darwin* } } */
-#include "../../../objc-obj-c++-shared/Object1.h"
+#include <objc/Object.h>
+#include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */
@interface XString: Object {
@protected
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-7.mm b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-7.mm
index d58cb91a7bb..a44845b0462 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-7.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-7.mm
@@ -5,28 +5,29 @@
/* { dg-do run } */
/* { dg-options "-fconstant-string-class=Foo" } */
/* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */
-/* { dg-additional-sources "../../../objc-obj-c++-shared/Object1.mm" } */
-#include "../../../objc-obj-c++-shared/Object1.h"
+#include "../../../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <objc/objc.h>
-@interface Foo: Object {
+@interface Foo: TestsuiteObject {
char *cString;
unsigned int len;
}
- (char *)customString;
@end
+#ifdef __NEXT_RUNTIME__
#ifdef NEXT_OBJC_USE_NEW_INTERFACE
Class _FooClassReference;
#else
struct objc_class _FooClassReference;
#endif
+#endif
-@implementation Foo : Object
+@implementation Foo : TestsuiteObject
- (char *)customString {
return cString;
}
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-8.mm b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-8.mm
index 17997b62842..1949a6e6523 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-8.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-8.mm
@@ -4,24 +4,25 @@
/* { dg-do run { target *-*-darwin* } } */
/* { dg-options "-fconstant-string-class=Foo" } */
/* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */
-/* { dg-additional-sources "../../../objc-obj-c++-shared/Object1.mm" } */
-#include "../../../objc-obj-c++-shared/Object1.h"
+#include "../../../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
-@interface Foo: Object {
+@interface Foo: TestsuiteObject {
char *cString;
unsigned int len;
}
@end
+#ifdef __NEXT_RUNTIME__
#ifdef NEXT_OBJC_USE_NEW_INTERFACE
Class _FooClassReference;
#else
struct objc_class _FooClassReference;
#endif
+#endif
-@implementation Foo : Object
+@implementation Foo : TestsuiteObject
- (char *)customString {
return cString;
}
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm
index e05c62b88a8..b4f15fdcdd6 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm
@@ -5,7 +5,8 @@
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
-#include "../../../objc-obj-c++-shared/Object1.h"
+#include <objc/Object.h>
+#include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */
@interface NSConstantString: Object {
char *cString;
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/string1.mm b/gcc/testsuite/obj-c++.dg/torture/strings/string1.mm
index deacf43b34b..e76eaa244da 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/string1.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/string1.mm
@@ -3,10 +3,7 @@
/* { dg-do run } */
/* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-/* { dg-additional-sources "../../../objc-obj-c++-shared/Object1.mm ../../../objc-obj-c++-shared/nsconstantstring-class-impl.mm" } */
-
-#include "../../../objc-obj-c++-shared/Object1.h"
-#include "../../../objc-obj-c++-shared/next-mapping.h"
+/* { dg-additional-sources "../../../objc-obj-c++-shared/nsconstantstring-class-impl.mm" } */
#include <string.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/obj-c++.dg/torture/tls/thr-init-3.mm b/gcc/testsuite/obj-c++.dg/torture/tls/thr-init-3.mm
index 29768886aab..a3d66089e31 100644
--- a/gcc/testsuite/obj-c++.dg/torture/tls/thr-init-3.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/tls/thr-init-3.mm
@@ -2,14 +2,13 @@
/* { dg-require-effective-target tls } */
/* { dg-add-options tls } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-/* { dg-additional-sources "../../../objc-obj-c++-shared/Object1.mm" } */
-#include "../../../objc-obj-c++-shared/Object1.h"
+#include "../../../objc-obj-c++-shared/TestsuiteObject.m"
extern "C" {
extern void abort ();
}
-@interface tsObj: Object {
+@interface tsObj: TestsuiteObject {
int ai ;
}
diff --git a/gcc/testsuite/obj-c++.dg/torture/trivial.mm b/gcc/testsuite/obj-c++.dg/torture/trivial.mm
index e627343a8cd..85f67514430 100644
--- a/gcc/testsuite/obj-c++.dg/torture/trivial.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/trivial.mm
@@ -1,12 +1,11 @@
// { dg-do run }
// { dg-xfail-run-if "OBJC2 runtime" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "-fgnu-runtime" } }
-// { dg-additional-sources "../../objc-obj-c++-shared/Object1.mm" }
-#import "../../objc-obj-c++-shared/Object1.h"
+#import "../../objc-obj-c++-shared/TestsuiteObject.m"
int main(void)
{
- [Object class];
+ [TestsuiteObject class];
return 0;
}
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-1.mm b/gcc/testsuite/obj-c++.dg/try-catch-1.mm
index a32bfeed6e5..cbdace62d43 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-1.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-1.mm
@@ -4,14 +4,14 @@
/* { dg-options "-fobjc-exceptions" } */
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
#include <stdio.h>
#include <setjmp.h>
-@interface Frob: Object
+@interface Frob: TestsuiteObject
@end
-@implementation Frob: Object
+@implementation Frob: TestsuiteObject
@end
static int exc_control = 0;
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-11.mm b/gcc/testsuite/obj-c++.dg/try-catch-11.mm
index 49e2c0cef15..320185fe0b3 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-11.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-11.mm
@@ -4,7 +4,7 @@
/* { dg-options "-fobjc-exceptions" } */
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
@protocol Proto1
- (int)meth1;
@@ -14,11 +14,11 @@
- (int)meth2;
@end
-@interface MyClass: Object <Proto2> {
+@interface MyClass: TestsuiteObject <Proto2> {
int a;
}
- (int)meth2;
-- (Object *)parm1: (id)p1 parm2: (id<Proto1>)p2;
+- (TestsuiteObject *)parm1: (id)p1 parm2: (id<Proto1>)p2;
@end
MyClass *mc1, *mc2;
@@ -27,7 +27,7 @@ MyClass *mc1, *mc2;
- (int)meth2 {
return a;
}
-- (Object *)parm1: (id)p1 parm2: (id<Proto1>)p2 {
+- (TestsuiteObject *)parm1: (id)p1 parm2: (id<Proto1>)p2 {
@try {
mc2 = p2; /* { dg-warning "type .id <Proto1>. does not conform to the .Proto2. protocol" } */
}
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-2.mm b/gcc/testsuite/obj-c++.dg/try-catch-2.mm
index 05aba36a46f..d214fa70d9a 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-2.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-2.mm
@@ -4,10 +4,10 @@
/* { dg-do run } */
/* { dg-xfail-run-if "PR23616" { *-*-* } { "-fgnu-runtime" } { "-fnext-runtime" } } */
-/* { dg-xfail-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" "-fgnu-runtime" } { "" } }
+/* { dg-xfail-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" "-fgnu-runtime" } { "" } } */
/* { dg-options "-fobjc-exceptions" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdio.h>
#include <stdlib.h>
@@ -18,10 +18,10 @@
#define CHECK_IF(expr) if(!(expr)) abort()
-@interface Frob: Object
+@interface Frob: TestsuiteObject
@end
-@implementation Frob: Object
+@implementation Frob: TestsuiteObject
@end
static Frob* _connection = nil;
@@ -29,7 +29,7 @@ static Frob* _connection = nil;
//--------------------------------------------------------------------
-void test (Object* sendPort)
+void test (TestsuiteObject* sendPort)
{
int cleanupPorts = 1;
Frob* receivePort = nil;
@@ -56,7 +56,7 @@ void test (Object* sendPort)
printf ("cleanupPorts = %d\n", cleanupPorts);
printf ("---\n");
- @throw [Object new];
+ @throw [TestsuiteObject new];
}
@catch(Frob *obj) {
printf ("Exception caught by incorrect handler!\n");
@@ -75,7 +75,7 @@ void test (Object* sendPort)
}
int main (void) {
- test((Object *)-1);
+ test((TestsuiteObject *)-1);
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-3.mm b/gcc/testsuite/obj-c++.dg/try-catch-3.mm
index 7577c5bfa43..b0822d3d7c7 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-3.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-3.mm
@@ -5,14 +5,14 @@
/* { dg-do compile } */
/* { dg-options "-fobjc-exceptions" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
const char *foo(void)
{
@try {
return "foo";
}
- @catch (Object* theException) {
+ @catch (TestsuiteObject* theException) {
return [theException name];
}
}
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-7.mm b/gcc/testsuite/obj-c++.dg/try-catch-7.mm
index b69c980b228..ecab4e6e366 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-7.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-7.mm
@@ -1,17 +1,17 @@
/* { dg-do compile } */
/* { dg-options "-fobjc-exceptions" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
int main (int argc, const char * argv[]) {
- Object * pool = [Object new];
+ TestsuiteObject * pool = [TestsuiteObject new];
int a;
if ( 1 ) {
@try {
a = 1;
}
- @catch (Object *e) {
+ @catch (TestsuiteObject *e) {
a = 2;
}
@finally {
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-8.mm b/gcc/testsuite/obj-c++.dg/try-catch-8.mm
index b6666237025..7adf2f9e326 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-8.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-8.mm
@@ -3,9 +3,9 @@
/* { dg-do compile } */
/* { dg-options "-fobjc-exceptions" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
-@interface Derived: Object
+@interface Derived: TestsuiteObject
- (id) meth;
@end
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-9.mm b/gcc/testsuite/obj-c++.dg/try-catch-9.mm
index a4331fc35e2..73c7c991709 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-9.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-9.mm
@@ -8,7 +8,7 @@
/* { dg-prune-output ".*internal compiler error.*" } */
/* { dg-options "-fobjc-exceptions -O2" } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdlib.h>
#include <stdio.h>
@@ -35,13 +35,13 @@ void foo (int arg1, float *arg2)
local6 = 18.0;
pi = &gi2;
pf = &gf2;
- obj2 = obj1 = [Object new];
+ obj2 = obj1 = [TestsuiteObject new];
arg1 = 17;
arg2 = &gf2;
- @throw [Object new];
+ @throw [TestsuiteObject new];
}
- @catch (Object *obj) {
+ @catch (TestsuiteObject *obj) {
if (local1 != 123 || local2 != 345 || local3 != 5.0
|| local4 != 6.0 || local5 != 17 || local6 != 18.0) {
printf("Abort 1\n");
@@ -66,4 +66,4 @@ int main(void) {
foo(15, &gf1);
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+
diff --git a/gcc/testsuite/obj-c++.dg/typedef-alias-1.mm b/gcc/testsuite/obj-c++.dg/typedef-alias-1.mm
index 79db8765ead..263ce010af0 100644
--- a/gcc/testsuite/obj-c++.dg/typedef-alias-1.mm
+++ b/gcc/testsuite/obj-c++.dg/typedef-alias-1.mm
@@ -1,15 +1,16 @@
/* Typedefs of ObjC types should work without any bogus warnings. */
/* { dg-do compile } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.h"
+#include <objc/objc.h>
-typedef Object MyObject;
+typedef TestsuiteObject MyObject;
int main (int argc, const char * argv[])
{
- Object* a = nil;
+ TestsuiteObject* a = nil;
MyObject* b = a;
- Object* c = b;
+ TestsuiteObject* c = b;
return 0;
}
diff --git a/gcc/testsuite/obj-c++.dg/va-meth-1.mm b/gcc/testsuite/obj-c++.dg/va-meth-1.mm
index c6aea14bcb6..2a120ee5cc2 100644
--- a/gcc/testsuite/obj-c++.dg/va-meth-1.mm
+++ b/gcc/testsuite/obj-c++.dg/va-meth-1.mm
@@ -2,13 +2,13 @@
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
-#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/TestsuiteObject.m"
#include <stdarg.h>
#include <stdlib.h>
/* Test methods with "C-style" trailing arguments, with or without ellipsis. */
-@interface MathClass: Object
+@interface MathClass: TestsuiteObject
/* sum positive numbers; -1 ends the list */
+ (int) sum: (int) firstNumber, int secondNumber, ...;
+ (int) prod: (int) firstNumber, int secondNumber, int thirdNumber;
@@ -72,4 +72,4 @@ int main (void)
return 0;
}
-#include "../objc-obj-c++-shared/Object1-implementation.h"
+