mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user