diff options
Diffstat (limited to 'gcc/testsuite/objc-obj-c++-shared/runtime.h')
-rw-r--r-- | gcc/testsuite/objc-obj-c++-shared/runtime.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/testsuite/objc-obj-c++-shared/runtime.h b/gcc/testsuite/objc-obj-c++-shared/runtime.h index bdc2bff..4d7d1c3 100644 --- a/gcc/testsuite/objc-obj-c++-shared/runtime.h +++ b/gcc/testsuite/objc-obj-c++-shared/runtime.h @@ -93,14 +93,16 @@ struct objc_method_description protocol_getMethodDescription (Protocol *protocol struct objc_method_description result; if (instanceMethod) - { - tmp = [protocol descriptionForInstanceMethod: selector]; - result = *tmp; - } + tmp = [protocol descriptionForInstanceMethod: selector]; + else + tmp = [protocol descriptionForClassMethod: selector]; + + if (tmp) + result = *tmp; else { - tmp = [protocol descriptionForClassMethod: selector]; - result = *tmp; + result.name = (SEL)0; + result.types = (char *)0; } return result; |