SILGen: Cope with overloads when emitting artificial main for @UIApplicationMain.

The overlay may add overloads for UIApplicationMain for various reasons. When we generate the special `main` implementation for a `@UIApplicationMain` class, we want to call the original function from Objective-C, so pick that one where there are multiple overloads to choose from. Fixes rdar://problem/42352695.
This commit is contained in:
Joe Groff
2018-07-18 15:58:11 -07:00
parent f83c17ca7f
commit cba32f79a5
5 changed files with 31 additions and 2 deletions

View File

@@ -3,6 +3,12 @@
@protocol UIApplicationDelegate
@end
#ifdef SILGEN_TEST_UIAPPLICATIONMAIN_NULLABILITY
int UIApplicationMain(int argc, char *_Nullable *_Nonnull argv,
NSString *_Nullable principalClassName,
NSString *_Nullable delegateClassName);
#else
int UIApplicationMain(int argc, char **argv,
NSString *principalClassName,
NSString *delegateClassName);
#endif