testsuite, objective-c++ : Add a dummy retain/release to testuite object.

On newer systems, the throw/catch process sends retain and release
messages to thrown objects.  While these are not needed in the testsuite
cases, they cause the tests to fail because the selector is not handled.
Add dummy methods to the testsuite object.

gcc/testsuite/ChangeLog:

	* objc-obj-c++-shared/TestsuiteObject.h: Add dummy retain and
	release method declarations.
	* objc-obj-c++-shared/TestsuiteObject.m: Add dummy retain and
	release implementations.
This commit is contained in:
Iain Sandoe 2020-10-07 16:24:14 +01:00
parent fd36daf64a
commit cc3014d80e
2 changed files with 16 additions and 0 deletions

View File

@ -45,6 +45,11 @@ __attribute__((objc_root_class))
+ (Class) superclass;
+ (const char *)name;
- (const char *)name;
/* For try-catch impl that retains and releases thrown objects. */
- (id) retain;
- (void) release;
@end
#endif /* _TESTSUITE_OBJECT_H_ */

View File

@ -66,4 +66,15 @@ along with GCC; see the file COPYING3. If not see
{
return object_getClassName (self);
}
- (id) retain
{
return self;
}
- (void) release
{
return;
}
@end